Please check is there any problem in the blocks. I am not getting result.
its Json data is:
{
“api”: {
“results”: 380,
“fixtures”: [
{
“fixture_id”: 65,
“league_id”: 2,
“league”: {
“name”: “Premier League”,
“country”: “England”,
“logo”: “https://media.api-sports.io/football/leagues/2.png ”,
“flag”: “https://media.api-sports.io/flags/gb.svg ”
},
“event_date”: “2018-08-10T19:00:00+00:00”,
“event_timestamp”: 1533927600,
“firstHalfStart”: 1533927600,
“secondHalfStart”: 1533931200,
“round”: “Regular Season - 1”,
“status”: “Match Finished”,
“statusShort”: “FT”,
“elapsed”: 90,
“venue”: “Old Trafford (Manchester)”,
“referee”: null,
“homeTeam”: {
“team_id”: 33,
“team_name”: “Manchester United”,
“logo”: “https://media.api-sports.io/football/teams/33.png ”
},
“awayTeam”: {
“team_id”: 46,
“team_name”: “Leicester”,
“logo”: “https://media.api-sports.io/football/teams/46.png ”
},
“goalsHomeTeam”: 2,
“goalsAwayTeam”: 1,
“score”: {
“halftime”: “1-0”,
“fulltime”: “2-1”,
“extratime”: null,
“penalty”: null
}
}
]
}
}
You can use look up pairs blocks for easy results. Its doesn’t need json tools. You can use web component’s json decode blocks
1 Like
This didnt work.
heres the apk
live.apk (5.2 MB)
pepocero
(Pepocero)
June 11, 2020, 4:00pm
6
Put the response content in a label to see if you receive the data (because the problem may be the url and the request headers that are wrong).
Edit:
What api are you using?
I don’t know what does Web1 decode work, but as I remember, for JSON, use dictionary get value from key , instead of look for pairs in lists
pepocero
(Pepocero)
June 11, 2020, 5:34pm
9
What it does is convert the response content into a list
But it’s true that now with the dictionaries it’s easier. Using something like this:
But it always depends on how the Json you get is organized.
For example, if you have this Json:
You can see that the data is within “articles”. So first you have to get the data inside “articles”.
And then you get the tag data you need, like “title”.
1 Like
I am not getting any response.
How should i use this link to fetch data using current date.
pepocero
(Pepocero)
June 12, 2020, 12:21am
12
So the problem is not getting the data from a json, it is getting the json.
Check the keys and request headers.
EDIT:
I don’t have access to the api (they ask for a credit card to test it) so I guess you could try something like this:
But you should read the documentation they offer. I am reading what they say and based on that I am telling you what you could do.
So you should read the documentation of the Api
It says this, after tryiing your blocks…
dora_paz
(Dora)
June 12, 2020, 8:58am
14
Most probably you set label.Background Color to get response content instead of set Label.Text
1 Like
Ooh Sorry, I fixed it and got the responce.
The mark appropriate post as solution.
1 Like
Can anyone guide me that how to get data from inner array of an array like the above json with dictionary. I want to make list of league with name, country and flag.
Thanks in advance.
getting trouble in getting value from array in other array.
What is global response in it.