Problems with calling wikipedia API
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Problems with calling wikipedia API
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
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
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Problems with calling wikipedia API
Check that "Internet" is among the selected inclusions in the Standalone Builder.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Problems with calling wikipedia API
Richard:FourthWorld wrote: ↑Fri Jan 29, 2021 8:28 amThis quickie demo grabs the JSON and displays it as an array, then grabs the first image URL and displays it
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
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Problems with calling wikipedia API
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.bobcole wrote: ↑Sat Jan 30, 2021 4:59 amRichard:FourthWorld wrote: ↑Fri Jan 29, 2021 8:28 amThis quickie demo grabs the JSON and displays it as an array, then grabs the first image URL and displays it
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
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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Problems with calling wikipedia API
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:
Thanks for helping,
Bob
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
Thanks for helping,
Bob
Re: Problems with calling wikipedia API
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
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