Example Webservice / API call- Yahoo Query Language with AutoHotkey

While we touched on this API in our API Webinar, I wanted to review a bit more and demonstrate the Yahoo Console which can greatly aide you in developing your API calls.  Below is the code I demonstrate in the video.  The Yahoo API is pretty straight-forward and, for many calls, you don’t need a secure Token or ID!

Video demonstrating Example API call to Yahoo

Example Webservice / API call- Yahoo query


Example Webservice / API call- OpenWeatherMap Forecast & Current conditions

Continuing with the examples shown in our webinar on Webservice APIs below I demonstrate how to use OpenWeatherMap’s API.

Here is the code I reviewed in the video demonstrating the various API calls.


Example API call to OpenWeatherMap

Example Webservice / API call- OpenWeatherMap Forecast & Current conditions

Example Webservice / API call- Extract JSON & Binary data from Smartsheets

In the webinar on APIs we discuss various types of data extraction but I don’t think I mentioned that you can also download binary data.  In this example I demonstrate how to connect to the SmartSheets API and extract both JSON (I also demoed this FormatJson function by tmplinshi which made the JSON much easier to read) and binary data (in this case a csv file).  Here is the AutoHotkey script I used during the below video:



Video demonstrating example API Call

Example Webservice / API call- Exporting JSON and binary data from SmartSheets

Example API Call- Top Reddit post to AutoHotkey subreddit

As we mentioned in our webservice / API webinar most APIs require Authentication.   In this example I noticed the number of records being returned by the API call was not nearly as many as when I did the same call with my browser  (I think this is because I didn’t bother to use my secret/token for oAuth2.)

I decided to use the developer tools in Chrome to see what headers were being sent to reddit.   Once I included the cookie header (data borrowed from my browser) I was returning a ton of data!  I also demonstrated the use of sXML_Pretty function by VxE to re-structure the XML to be “pretty” for humans.

Here is the video where I document the Example API Call and show how to use the Chrome Developer tools

Example Webservice / API call- Top post on AutoHotkey reddit