File tree Expand file tree Collapse file tree 4 files changed +57
-0
lines changed Expand file tree Collapse file tree 4 files changed +57
-0
lines changed Original file line number Diff line number Diff line change @@ -2,3 +2,6 @@ NEXMO_API_KEY='YOUR_API_KEY'
2
2
NEXMO_API_SECRET = ' YOUR_API_SECRET'
3
3
TO_NUMBER = ' EXAMPLE_TO_NUMBER'
4
4
FROM_NUMBER = ' EXAMPLE_FROM_NUMBER'
5
+
6
+ # Number Insight examples
7
+ INSIGHT_NUMBER = ' NUMBER_FOR_INSIGHT'
Original file line number Diff line number Diff line change
1
+ import os
2
+ from os .path import join , dirname
3
+ from pprint import pprint
4
+ from dotenv import load_dotenv
5
+
6
+ dotenv_path = join (dirname (__file__ ), '../.env' )
7
+ load_dotenv (dotenv_path )
8
+
9
+ NEXMO_API_KEY = os .getenv ('NEXMO_API_KEY' )
10
+ NEXMO_API_SECRET = os .getenv ('NEXMO_API_SECRET' )
11
+ INSIGHT_NUMBER = os .getenv ('INSIGHT_NUMBER' )
12
+
13
+ import nexmo
14
+
15
+ client = nexmo .Client (key = NEXMO_API_KEY , secret = NEXMO_API_SECRET )
16
+
17
+ insight_json = client .get_advanced_number_insight (number = INSIGHT_NUMBER )
18
+ pprint (insight_json )
Original file line number Diff line number Diff line change
1
+ import os
2
+ from os .path import join , dirname
3
+ from pprint import pprint
4
+ from dotenv import load_dotenv
5
+
6
+ dotenv_path = join (dirname (__file__ ), '../.env' )
7
+ load_dotenv (dotenv_path )
8
+
9
+ NEXMO_API_KEY = os .getenv ('NEXMO_API_KEY' )
10
+ NEXMO_API_SECRET = os .getenv ('NEXMO_API_SECRET' )
11
+ INSIGHT_NUMBER = os .getenv ('INSIGHT_NUMBER' )
12
+
13
+ import nexmo
14
+
15
+ client = nexmo .Client (key = NEXMO_API_KEY , secret = NEXMO_API_SECRET )
16
+
17
+ insight_json = client .get_basic_number_insight (number = INSIGHT_NUMBER )
18
+ pprint (insight_json )
Original file line number Diff line number Diff line change
1
+ import os
2
+ from os .path import join , dirname
3
+ from pprint import pprint
4
+ from dotenv import load_dotenv
5
+
6
+ dotenv_path = join (dirname (__file__ ), '../.env' )
7
+ load_dotenv (dotenv_path )
8
+
9
+ NEXMO_API_KEY = os .getenv ('NEXMO_API_KEY' )
10
+ NEXMO_API_SECRET = os .getenv ('NEXMO_API_SECRET' )
11
+ INSIGHT_NUMBER = os .getenv ('INSIGHT_NUMBER' )
12
+
13
+ import nexmo
14
+
15
+ client = nexmo .Client (key = NEXMO_API_KEY , secret = NEXMO_API_SECRET )
16
+
17
+ insight_json = client .get_standard_number_insight (number = INSIGHT_NUMBER )
18
+ pprint (insight_json )
You can’t perform that action at this time.
0 commit comments