Page 2 of 2
Re: Problems with calling wikipedia API
Posted: Fri Jan 29, 2021 10:54 am
by glenn9
Just wanted to say a big thank you to everyone for all the hints and tips re API calls - I think I'm starting to get the hang of it now which has enabled me to start exploring APIs from other sources.
Just another question... I've just built a small standalone which includes API calls but they don't seem to work in the standalone! They do however work fine when called within the IDE - is there something I need to do to allow them to be activated in a standalone?
Kind regards,
Glenn
Re: Problems with calling wikipedia API
Posted: Fri Jan 29, 2021 3:57 pm
by FourthWorld
Check that "Internet" is among the selected inclusions in the Standalone Builder.
Re: Problems with calling wikipedia API
Posted: Sat Jan 30, 2021 4:59 am
by bobcole
FourthWorld wrote: Fri Jan 29, 2021 8:28 am
This quickie demo grabs the JSON and displays it as an array, then grabs the first image URL and displays it
Richard:
Your demo stack is a great learning tool. Awesome!
I looked through the script and found the API link you used:
https://en.wikipedia.org/api/rest_v1/#/ ... media-list
I am amazed that you could figure out that Wikipedia API web page so fast. And then write a working stack, too.
You are a tremendous resource for the LiveCode community; a brilliant gem.
Many thanks!
Bob
Re: Problems with calling wikipedia API
Posted: Tue Feb 02, 2021 6:56 pm
by FourthWorld
bobcole wrote: Sat Jan 30, 2021 4:59 am
FourthWorld wrote: Fri Jan 29, 2021 8:28 am
This quickie demo grabs the JSON and displays it as an array, then grabs the first image URL and displays it
Richard:
Your demo stack is a great learning tool. Awesome!
I looked through the script and found the API link you used:
https://en.wikipedia.org/api/rest_v1/#/ ... media-list
I am amazed that you could figure out that Wikipedia API web page so fast. And then write a working stack, too.
You are a tremendous resource for the LiveCode community; a brilliant gem.
Many thanks!
Bob
Thank you for the kind words, Bob. A lot of my work these days has me doing LC integrations with online services, so your post became a good test case for what I've been learning, how quickly I could come up with a usable solution.
Glad you posted that for other reasons as well: Wikipedia is a great resource, and I was unfamiliar with the scope of their APIs. They offer a surprisingly broad range of capabilities there, with good clean API design. Very glad you brought their API to my attention.
Re: Problems with calling wikipedia API
Posted: Wed Feb 03, 2021 3:30 am
by bobcole
Richard:
I was successful building the stack as a standalone app but it took some trial and error to figure out what inclusions were needed.
Here are the inclusions I found were necessary:
- Tree View
- JSON Library
- Internet
- SSL & Encryption
- Answer Dialog (the Ask Dialog seems to automatically check itself)
- mergJSON
This project has also been a good opportunity for me to learn about the inclusions list.
Thanks for helping,
Bob
Re: Problems with calling wikipedia API
Posted: Wed Feb 03, 2021 1:57 pm
by glenn9
Hi Bob,
thanks for sharing this, have just tried it as well and the inclusions you suggested work perfectly in my desktop standalone and together with Jacque's advice
viewtopic.php?f=7&t=35348#p201272 should work for Android as well.
Regards,
Glenn