We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LDGeography.GetAllCountries
#1
Helo evrybody,

When I use  countries = LDGeography.GetAllCountries(), the result is "FAILED". Am I doing something wrong, or is the command not working properly?
Can someone provide a working example?

Best regards
martmen
Reply
#2
Hi,
This was added to LD extension in 2019 by Abhishek Sathiabalan - he was keen to add stuff at that time.
I have never really used it, but it was tested and did work when it was added.
Unfortunately it looks like it uses restcountries.eu/rest/v2/all that has since disappeared, maybe changed into something else.
Reply
#3
When I search for "restcountries.eu" there is a redirection to "countrylayer.com".
Perhaps you can look there.
Reply
#4
Yes I saw that, but the API is different with different functions.
It's not a simple change, it's a rewrite with maybe different options as far as I can see.
Reply
#5
Martin,

If this is something that is of particular interest for a project I will look at getting a free API key for the new website and see what I can do.
Reply
#6
Hi, it turns out  the API is very similar and I updated to a free version of the new API (100 calls per month so use sparingly!).  Please try updated beta version of LD extension, version 1.2.30.9.

EDIT - I added LDGeography.APIKey to version 1.2.30.10 to allow you to use your own key, see https://countrylayer.com/pricing.
[-] The following 1 user Likes litdev's post:
  • AbsoluteBeginner
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)