How can i implement any type of API into my application.
Which type api?is this api return data in json format?
For retrieving, sending data to a web api , you can use the web component:
Also see here:
How to work with the web component and an API by Stephen
And some times, the api’d return the response in json format, so you’d need to parse it to list of lists using this block:
See here:
- How to work with Lists and Lists of lists (pdf) by appinventor.org
-
An example of a complex List of Lists
Or parse it to dictionaries, which is the best solution for json text , you will need to use this extension:
Also you can see this guide by @WatermelonIce:
Some of the links above, are from here : App Inventor Links | Pura Vida Apps
3 Likes
like i want to return current time with the API to my app
Use the Web Component.
Use the URL Property for that Component.
You need to read about the api.
1-Check if you need to pass any parameters to the API.
2- If you need to pass a parameter, use the POST method of the Web Component.
3- If you don’t need to use GET
4- Check the API return on the API website.
5- Treat the return of the API in the Kodular blocks.
1 Like