1. Apps - Where do they get their data/information from? They get them from two sources: from other websites and the device itself
- from websites
- Google, Maps, YouTube, Instagram, Twitter, etc (most all websites have "backdoors" into them)
- from the devices: - the camera - the microphone - GPS chips - motion detectors (accelerometer) - other chips - heart rate chip, barometer, etc
In this section, we will cover the first category - from other websites
Many apps use data from other sites and mix them together and dress it up with nice graphics. Some examples are weather apps, clocks, maps, and more... Many websites have what are called API's or Application Program Interfaces. That just means that they give you a way to get the information using your own program. Once you get the data from them, then you can use it any way that you can. It is like a "backdoor" into their website without using a browser and going through many screens to get your answer Sometimes, you get the data from multiple sites before mashing up the data (combining it). For instance, you can go to Wendy's to get a list of all their restaurants near you, then go to Google Maps to drop pins for all those places and show them on a map. Weather.com is one of many websites that has a webpage that shows you what the weather is like for your location. You have to go to their website, type in your information to see your weather. Instead, you can get just the data and show it your own way on your smartphone or computer. Many websites require that you register to use their API's to protect themselves and some charge for it. Once you register, you get a key to use in your APIs. The following example has a key but it is a fake one, so you can not use it to test.
Mashups - apps that use data from multiple websites
Many apps use data from multiple other sites and mix them together and dress it up with nice graphics. For instance, you may go to Starbucks to get the locations of Starbucks nearby to you, then pass that data to Google to map it. Or you may take a picture of a barcode, send it to a shopping website to get the stores where it is least costly, then go to those sites to get nearby locations and send those to Google maps to map it for you.
There is a good introduction on How To Make Your Own Web Mashup in other languages on the ProgrammableWeb site. Otherwise, we will step through making your own in LiveCode.
Some interesting articles by doing a Google Search on "How to build a mashup"
Finding Websites that provide data The easiest way is to do a Google search like "Stock quotes api" or "Yahoo stock api". or whatever that you are looking for
There are also many popular and public websites that provide data and some in the form of RSS feeds. For our example we are going to use data from World Weather Online
Basically you will be making a request from a website for data. Then after you get the data, you can use parts of it, put it into a table or display it with graphics.
Many Website API's are free. Some of them require you to register, which is also usually free. The just want to monitor you to make sure that you do not cause them harm or generate too much traffic that takes down their servers. Usually, they will have a hourly, daily or monthly limit to your calls. If you exceed their limits, you may be asked to pay a general fee based on usage. That is reasonable.
PublicSPIs - the largest API directory in the Galaxy
|
|