400 likes | 608 Views
Modeler. API Paradox. API Data Useful for Career Decisions?. Yes. No. Access to API Data without learning API Mechanics?. Learn a Skill Not Needed for a Job. No. API Skills Required for Job?. Yes. 14,954. 0.4%. 3,491,915. API Templates: Authorizatio n. import oauth2 as oauth
E N D
API Paradox API Data Useful for Career Decisions? Yes No Access to API Data without learning API Mechanics? Learn a Skill Not Needed for a Job No API Skills Required for Job? Yes 14,954 0.4% 3,491,915
API Templates: Authorization import oauth2 as oauth import urllib2 as urllib # See Assignment 1 instructions #or README for how to get these credentials access_token_key= "<Enter your access token key here>" access_token_secret = "<Enter your access token secret here>" consumer_key = "<Enter consumer key>" consumer_secret = "<Enter consumer secret>" _debug = 0 oauth_token = oauth.Token(key=access_token_key, secret=access_token_secret) oauth_consumer = oauth.Consumer(key=consumer_key, secret=consumer_secret)
API Templates: Pull Data deffetchsamples(): url = "https://stream.twitter.com/1/statuses/sample.json" parameters = [] response = twitterreq(url, "GET", parameters) for line in response: print line.strip() if __name__ == '__main__': fetchsamples()
API OverviewApplication Programming Interface • E-Bay • Short Examples – R, Javascript, PhP • Career Related APIs
Users buy and sell items using the eBay online interface Source: eBay
With the eBay API, communicate directly with the eBay database in XML format. partners JSON ODBC Source: eBay
ebay.com Source: ebay
With the eBay API, communicate directly with the eBay database in XML format. JSON JSON ODBC Web Scraping Source: ebay
XML:eXtensibleMarkup Language http://open.api.ebay.com/shopping?callname=FindPopularItems&responseencoding=XML&appid=JohnVero-34f1-4c5f-9423-cf1fd36337be&siteid=0&QueryKeywords=redsox&version=849
IF an API is Public WYSIWYG What You See Is What You Get
most organizations require you to register you will then receive an API Key
http://open.api.ebay.com/shopping?callname=FindPopularItems&responseencoding=XML&appid=JohnVero-XXXX&siteid=0&QueryKeywords=redsox&version=849http://open.api.ebay.com/shopping?callname=FindPopularItems&responseencoding=XML&appid=JohnVero-XXXX&siteid=0&QueryKeywords=redsox&version=849
URL CONTENT ORG API FORMAT KEYWORD API KEY Oauth XML JSON http://open.api.ebay.com/ &QueryKeywords=redsox &responseencoding=XML shopping?callname=FindPopularItems &appid=JohnVero-XXXXXXXXXXXXXXXXXXXXXX &Page &Parameters &Sort
Applications Analytics
Mobile • MBTA
175m+ professionals (as of August 2, 2012) https://developer.linkedin.com/partner