new_code
(new code)
June 2, 2021, 2:23pm
#1
I am unable to fetch data from api. I am using components web, json tool extension and below are my code. I want to get name ,url,assests and categories.
vknow360
(Sunny Gupta)
June 2, 2021, 2:25pm
#2
You forgot to add response result and do it result of blocks in your post.
There are several ways to do this
Your json return (Response Content) can have multiple formats.
Jsontools is a Extension?
You don’t need It.
Use dictionary blocks
Or
Lookup pairs Key
As I understand it, the second POST/Get is within the Web.Got of the first POST/Get.
So Response Content, Code etc are results of the first POST/Get.
Remove Post.Text, Set URL and Request Headers from within Web.Got.
Have it called under an “IF” condition out Web.Got.
And within Web.Got create an “IF” to differentiate which Response Content, Code you are using.
I saw that you already have this condition “If” - “If get Url”. So you don’t have to change.
[got]
You can try using the block :
( and so learn …just a suggestion)
[keypath]
+
[makelist]
+
[stringname]
+
[foreach]
+
[lookuppairs2]
[sitenames]
One question: Will your Json always be like this?
date, date2, date3, date4, date5 …
daily, daily2, daily3, daily4, daily5…
Nobody knows what you did.
There are 2 PHP Scripts ( here in community )ready to help beginners.
You do not need an extension to access Mysql. OK ?
In web got, you will have to use response Content (this is where you will have the data returned from your Script). You can use the response code to check the return code
You can use the Json Decode text Block to handle Response Content.
You can use dictionary blocks.
You can use lookup pairs Key together with Json Decode text to get values by…
1 Like
new_code
(new code)
June 3, 2021, 4:07am
#4
can you tell me how i get values from this api
https://pub.gamezop.com/v3/games?id=RSIbDZ1Nd
using json tool extension.
I want to get name ,url,assests and categories of every game in given api.
msr79526
(SR Official)
June 3, 2021, 1:01pm
#6
Show us your json response
1 Like
Did you try something?
Are these blocks yours?
The examples I gave teach you how to do it.
Did You Read ?