Tuesday, March 24, 2015

Web Application Programming Interfaces and Why They Rock!


api2.jpg
Web Application Programming Interfaces, or API's, are sets of programming instructions and standards for accessing information in a specific software or hardware over the internet.  API's allow different software/hardware to "talk" with each other and securely exchange information with websites, web applications, mobile apps, and other devices.  API's are released to the public so that other software developers can create new products and applications that are intertwined with that software.  
Still a little confused?  
Imagine a website like Imgur or Photobucket, where billions of photos are uploaded and millions of users have accounts and public profiles.  Suppose you want to create a mobile app that updates you when your favorite users post new content.  This data will need to be made available to you, somehow.  Imgur could release an API so that Web and App developers could "pull" certain information when called on and "push" it back to their own application or software.  
So in this example, Imgur could say “if you call the method 'imgur.photos.search' and then add the user you want to search, we will check permissions and then send the search results to you.”  Imgur could create hundreds of call-methods for the developers to use, such as "get all of the photos from user ____" or "tell me what sizes this photo is available in".  There are hundreds of uses for Web API's, from sharing photos from one social media site to another, to embedding content from a different source or app, to live comment sharing.
Hopefully now "Application Programming Interface" makes a little more sense -- You are programming an application, and this is the interface and rules you must adhere to when talking to _____ (in this case, Imgur.)

Important Web API's

Imgur was used as an example earlier, but there are tons of different API's on the web and all of them are used for something different.

Google
Google is becoming a huge staple in our everyday lives.  I worship Google Chrome, use Gmail for my personal and school email accounts, and Youtube is my main video resource.  Android phones are getting to be as popular as the iPhone, and now Google is even working to create driverless cars and wearable tech such as glasses and wristbands.  The more technology Google releases, the more opportunities developers and designers have to create applications that work well with it’s projects.  Google has a ton of API’s available to the public.  
The Google Maps API, for example, allows you to add interactive maps and street view imagery to your website or mobile app, and works with Web, ioS and Android.  You have the option to use styled maps to change the visual style of the map and customize it to fit your needs.  W3schools offers a nice little tutorial on how to create a Basic Google Map using Google Maps API located here.  

Using the Maps API with the Directions API, you could create an app that shows a map and address to your establishment, then allows the user to search for directions based on their closest location.  Other important Google API’s include the Google+ API, which allows users to log-in to 3rd-Party services using their Google+ account, and the Custom Search API, which allows for searching on your own website and customizing search results.  

Google also has a few API’s specifically for Youtube, including an Analytics API, which provides feedback on views and demographic information, and a Live Streaming API, which allows you to create and manage live events on Youtube through video streaming from an outside website.  

A list of all available Google API’s can be found here.  For more information on a specific API, simply click the API link and view the API documentation.

Facebook
Google may seem like the new internet overlords, but Facebook has them beat on the Social Media front.  That’s why learning to use Facebook’s API’s is imperative if you’re interested in developing apps and software for social media networks.  
Facebook Developers was released in March of 2007 (though it was named Facebook Platform at the time), and provided developers with the tools and standards needed to create third-party software/applications that could interact and share information back-and-forth with Facebook.  Facebook Developers offers 2 main API's, as well as several SDK’s (Software Development Kits) for the use of Facebook Login and plugin’s with iOS, Android, PHP, Javascript and Unity.

facebook-developers.jpg



Facebook’s Graph API is the main API for the website, and is the primary way for Apps and other widgets to read information from Facebook and post their own content.  Think of the Graph as a giant bowl that holds and supports the smaller API’s needed.  The Graph API can be used in a variety of ways, from getting real-time updates to your phone, to publishing status updates from a third party application like Spotify or G+.  

Mobile gaming has steadily been rising since the big “Angry Bird Outbreak” and Facebook has a few API’s that can help developers share their game information on Facebook.  The Scores API can be used with the Graph API to track player’s game scores on a mobile device and post them to their timeline, as well as build social leaderboards between friends who play the same game and share their Facebook information with the mobile game app.  The Achievements API works a lot like the Scores API, but is specifically for Facebook games.  This API allows developers to create a set of achievements for their apps, giving users the ability to share their achievements to their profile and an incentive to continue playing.       

The Ads API (also known as the Marketing API) allows developers to “access Facebook’s advertising platform from their own advertising tools”.  Using this API developers can manage their audience information to help find new customers, create ads to show on Facebook to target audiences, and manage all Facebook assets, including pages, apps, and ad accounts.

If you’re interested in learning how to create Apps or programs that work side-by-side with Facebook, it’s important you start by learning the Graph API.  As stated before, the Graph API is the primary way to send and receive data to Facebook, and most of the tasks you will want your app to do will require the use of this API.  Thankfully, Facebook offers a full tutorial/guide to teach you how to get your app to accomplish simple tasks using the Graph API.  If you’re interested in learning more about Facebook API’s, check out the developers page here.  

The Future of API’s?
As stated earlier, the more that technology advances and we continue to get new web-based products, the more the need for API’s will grow.  I often see technological/societal advancements that I believe will bring about great ideas in the future.  For example, a new(ish) company, UrTheCast have installed a camera on the International Space Station for the purpose of streaming live video footage of the Earth’s atmosphere to their website.

UrTheCast has already began releasing access keys for their API’s to begin working on creating public apps and websites that work with their tech.  Satellite Trackers and Map Tiles are on the list for future apps, and I’m interested in seeing what the API’s will make available.  I would love to create a “live desktop wallpaper” based off of the tracking of their app.

Confusing, but BIG!
API’s are a HUGE part of technology, and it’s important that we realize just how much they help us in our web-obsessed world.  API’s allow us to connect to each other on a much broader spectrum than just one website or application.  API’s allow us to share articles and images to each other from all over the web at the click of a single button.  API’s allow us to give our users peace-of-mind when it comes to creating accounts on unknown apps or websites.   

We’ve covered quite a bit on API’s so far in this blog, but keep in mind we’ve barely scratched the surface.  APIs are not limited to websites. Anything connected to the internet can have an API.  You can use an API to determine your computers power supply temperature.  Do you want to talk to your router from your own application and have it restart? There's an API for that. Send an email from your refrigerator?  As long as it’s connected to the internet (and you’d be surprised what is these days) there's an API you can create for it.  

For more information on API’s and how they’re used, check out the links below:




No comments:

Post a Comment