progr
(Adah Adisha)
December 3, 2020, 9:13pm
1
Hello,
I’m making an app for displaying information about an IP address and I’m using IPAPI
Everything (continent, country, region, etc.) works fine from the Web.Got Text block until I try to display ISP and Threat Level - it gives an error “No value for isp” and “No value for threat_level”
This is what I have tried so far:
And this is a screenshot of their example API Response:
Documentation
What am I doing wrong? Help is appreciated.
Titan_geek
(Titan geek)
December 3, 2020, 9:23pm
2
I don’t have much idea but logically
I say “isp” and “Threat level” is under connection and security and not direct like other
progr
(Adah Adisha)
December 3, 2020, 9:26pm
3
Yes, I see but I don’t know how to specify it being under “security”.
Titan_geek
(Titan geek)
December 3, 2020, 9:28pm
4
I donno make list maybe Security then Threat level
progr
(Adah Adisha)
December 3, 2020, 9:52pm
6
Like that? Because it gives No value again
Taifun
December 3, 2020, 9:56pm
7
read the guide and use the get value for key from dictionary blocks
Taifun
3 Likes
Rogerio_Rios
(Professional Support)
December 3, 2020, 9:57pm
8
Please , Read soothing. Note the names of the blocks … These names represent what the blocks perform.
The guide explains everything in detail.
1 Like
dora_paz
(Dora)
December 3, 2020, 10:08pm
9
I use dictionary blocks instead of JsonTools
3 Likes
progr
(Adah Adisha)
December 4, 2020, 6:50am
10
I tried using this method but I get a not found
Rogerio_Rios
(Professional Support)
December 4, 2020, 10:56am
11
Did You check Response Content ?
Rogerio_Rios
(Professional Support)
December 4, 2020, 11:30am
13
Where are “isp” and “connection” ?
1 Like
progr
(Adah Adisha)
December 4, 2020, 11:31am
14
I don’t know, that’s what it gives with these blocks:
dora_paz
(Dora)
December 4, 2020, 11:32am
15
Most probably you get isp and connection when you use a payed plan not in free plan
1 Like
Rogerio_Rios
(Professional Support)
December 4, 2020, 11:36am
17
Friend, if the JSON return does not return “isp” or “connection” values, it will be impossible for you to get these values. See your JSON, there is no “isp” or “connection”.
With these blocks above you can get the values: city, continent code, country_name, latitude, capital …
2 Likes
Taifun
December 4, 2020, 5:35pm
18
never set the response content…
use your own global variable…
which btw. also helps to use Do it… remember…
use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun
2 Likes