setup api introductie

39
API Introductie De API-Koning, SETUP, Utrecht, 12 April 2012 Anne Helmond www.digitalmethods.net

Upload: annehelmond

Post on 08-May-2015

3.501 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Setup API Introductie

API Introductie De API-Koning, SETUP, Utrecht, 12 April 2012

Anne Helmond

www.digitalmethods.net

Page 2: Setup API Introductie

An application programming interface (API) is a source code based specification intended to be used as an interface by software components to communicate with each other. An API may include specifications for routines, data structures,object classes, and variables. (Wikipedia)

API introduction

Page 3: Setup API Introductie

Application Programming Interface

“this refers to a set of tools that developers can use to access structured data.” (boyd and Crawford)

“Machine-facing interfaces for your application” p. 331

“software interface to your website” p. 332

“weaving the Guardian into the fabric of the Web” p. 331

API

Page 4: Setup API Introductie

When used in the context of web development, an API is typically a defined set of Hypertext Transfer Protocol (HTTP) request messages, along with a definition of the structure of response messages, which is usually in an Extensible Markup Language (XML) or JavaScript Object Notation (JSON) format. While "Web API" is virtually a synonym for web service, the recent trend (so-called Web 2.0) has been moving away from Simple Object Access Protocol (SOAP) based services towards more direct Representational State Transfer (REST) style communications.[5] Web APIs allow the combination of multiple services into new applications known as mashups.[6] - (Wikipedia)

Web API / web service

Page 5: Setup API Introductie

The web as platform

Historically, some types of software like desktop operating systems have been called 'platforms' because through their APIs they provide the foundation on which other programs are built. The phrase 'web as platform' refers to fact that as web sites start providing their own APIs, they too are becoming a platform on which other programs can be built. (Programmableweb)

Page 6: Setup API Introductie

Programmable web

Definitionally, a “platform” is a system that can be reprogrammed and therefore customized by outside developers—users—and in that way, adapted to countless needs and niches that the platform’s original developers could not have possibly contemplated, much less had time to accommodate.

[T]he key term in the definition of platform is ‘programmed’. If you can program it, then it’s a platform. If you can’t, then it’s not. - Marc Andreessen

Page 7: Setup API Introductie

APIs and Web 2.0

A Platform Beats an Application Every Time - O’Reilly 2005

Page 8: Setup API Introductie

Flickr: blog this photo

Page 9: Setup API Introductie

cross-platform realtime photo search

Page 10: Setup API Introductie

APIs and mashups

Page 11: Setup API Introductie

IFTT: combining cloud services

Page 12: Setup API Introductie

IFTT: combining cloud services

Page 13: Setup API Introductie

IFTT: combining cloud services

Page 14: Setup API Introductie

IFTT: combining cloud services

Page 15: Setup API Introductie

IFTT: combining cloud services

Page 16: Setup API Introductie

IFTT: combining cloud services

Page 17: Setup API Introductie

IFTT: combining cloud services

Page 18: Setup API Introductie

IFTT: combining cloud services

an interface for programming the application programming interface

Page 19: Setup API Introductie

API calls

Page 20: Setup API Introductie

request your own data (limited)

through API calls

Page 21: Setup API Introductie

archiving your own data

Page 22: Setup API Introductie

archiving your own data

Page 23: Setup API Introductie

analyzing your own data

Page 24: Setup API Introductie

API literature

Page 25: Setup API Introductie

API literature

In relation to user interface/programming interface: Cramer and Fuller 2008

In relation to the volatility of methods: Helmond and Sandvig 2010

In relation to proprietary API calls: Berry 2011

In relation to Big Data: boyd and Crawford 2011

In relation to data gathering skills: Manovich 2011

In relation to scraping: Marres and Weltevrede 2012

Page 27: Setup API Introductie

#1 limited API calls

There are limits to how many calls and changes you can make in a day

API usage is rate limited with additional fair use limits to protect Twitter from abuse.

https://dev.twitter.com/docs/things-every-developer-should-know

Page 28: Setup API Introductie

#1 limited API calls

Page 29: Setup API Introductie

#2 changing APIs

Page 30: Setup API Introductie

#2 changing APIs

Page 31: Setup API Introductie

#2 changing APIs

Page 32: Setup API Introductie

#2 changing APIs

Page 33: Setup API Introductie

#2 changing APIs

“This document and the APIs herein are subject to change at any time. We will version the API, but may deprecate early versions aggressively.” - Love, Delicious.

http://delicious.com/help/api

Page 34: Setup API Introductie

#3 APIs and control

http://www.socialsignal.com/system/files/2007-07-30-api.gif

Page 35: Setup API Introductie

#4 APIs and access

“Register for a free API key and get 133% more queries/day.” Topsy

Page 36: Setup API Introductie

#4 APIs and access

Twitter Inc. makes a fraction of its material available to the public through its APIs. The ‘firehose’ theoretically contains all public tweets ever posted and explicitly excludes any tweet that a user chose to make private or ‘protected.’ Yet, some publicly accessible tweets are also missing from the firehose. Although a handful of companies and startups have access to the firehose, very few researchers have this level of access. (boyd and Crawford 2011)

Page 37: Setup API Introductie

There are different data gathering methods: The API is the polite way of gathering data and scraping could be considered the impolite way of harnessing data: “You can arrange digital research methods on a spectrum of niceness. On the one hand you use the industry-provided API. On the other you scrape Facebook for all it is worth.”(Helmond & Sandvig 2010)

Scrapers stand in complex relations to API’s - compared against the industry provided (limited) APIs, scrapers may be viewed as the less polite variant of data collection and in some cases may works against copyright, terms of service, and “trespass to chattels”. (Marres & Weltevrede 2012)

# 5 ethics: APIs “versus” scraping

Page 39: Setup API Introductie

• http://thinkupapp.com/

• http://ifttt.com

• http://www.programmableweb.com/faq

• http://www.poynter.org/how-tos/digital-strategies/165347/8-apis-your-news-organization-should-start-using-today/

• Bell, G (2009). Building Social Web Applications. Sebastopol: O’Reilly Media.

• Berry, D. (2011). The Philosophy of Software: Code and Mediation in the Digital Age. New York: Palgrave Macmillan.

• Bogost, I. and Montfort, N. (2009). Platform Studies: Frequently Questioned Answers. Proceedings of the Digital Arts and Culture Conference, 2009.

• boyd, d. and Crawford, K. (2011) Six Provocations for Big Data. A Decade in Internet Time: Symposium on the Dynamics of the Internet and Society, September 2011. Available at SSRN

• Cramer, F. and Fuller, M. (2008) Interface. in: Fuller, M. (ed). Software Studies: A Lexicon,Cambridge: MIT Press.

• Helmond, A and Sandvig, C. (2010). ‘On the Evolution of Methods.’ Workshop “Research Methods in the Digitally Networked Information Age” organized by The Berkman Centerfor Internet & Society and the University of St. Gallen in Brunnen, Switzerland from 10 to 12 May 2010.

• Langlois, G., McKelvey, F., Elmer, G & Werbin, K. (2009). Mapping Commercial Web 2.0 Worlds: Towards a New Critical Ontogenesis. Fibreculture 14.

• Manovich, L. (2011) ’Trending: The Promises and the Challenges of Big Social Data.’ Debates in the Digital Humanities, edited by Matthew K. Gold. The University of Minnesota Press, forthcoming 2012. PDF available at http://lab.softwarestudies.com/2011/04/new-article-by-lev-manovich-trending.html

• O’Reilly (2005). ‘What is Web 2.0.’

sources