NASA APIs Mashup Competition

Posted by on in Blogs

More and more funny things are happening on our Embarcadero Community website. If you have missed recent blog post by Marco Cantu, Delphi Product Manager, here is the link to

#FunWithDelphi: NASA API Mashup

All C++Builder and Delphi developers are welcome to build cool, funny and innovative apps that integrate with public NASA API. The first three apps will win Amazon Gift Cards:-)

Marco posted to github a sample app that you can download, customize and use a starting point to your own developments.

NASA APIs are plain REST web services that return JSON. The first thing before you would be able to make calls into NASA APIs, you need to get your API key at https://api.nasa.gov/index.html#apply-for-an-api-key

Sample demo integrates with the APOD web service. The picture of the day. A call for today's image has the following form:

https://api.nasa.gov/planetary/apod?api_key={Your_API_Key_Goes_Here}

Adding additional "Date" parameter returns JSON package with picture of the day for a given date. For example issuing the following HTTP GET request:

https://api.nasa.gov/planetary/apod?api_key={Your_API_Key}&date=2017-01-01 

returns the following JSON


{
  "copyright": "Sebastian Voltmer",
  "date": "2017-01-01",
  "explanation": "Higher than the highest building, higher than the highest mountain, higher than the highest airplane, lies the realm of the aurora.  Auroras rarely reach below 60 kilometers, and can range up to 1000 kilometers.  Aurora light results from energetic electrons and protons striking molecules in the Earth's atmosphere.  Frequently, when viewed from space, a complete aurora will appear as a circle around one of the Earth's magnetic poles.  The featured wide-angle image, horizontally compressed, captured an unexpected auroral display that stretched across the sky five years ago over eastern Norway.",
  "hdurl": "http://apod.nasa.gov/apod/image/1701/aurora_voltmer_1920.jpg",
  "media_type": "image",
  "service_version": "v1",
  "title": "A Full Sky Aurora Over Norway",
  "url": "http://apod.nasa.gov/apod/image/1701/aurora_voltmer_960.jpg"
}

The response contains URLs to images that can be downloaded into an app.

More interesting NASA APIs to integrate with is listed on https://data.nasa.gov/developer



About
Gold User, Rank: 9, Points: 364
Crazy about Delphi Programming!

Comments

Check out more tips and tricks in this development video: