harnessing free content with web service apis

56
print $title; print $subtitle; print $author; print $position; print $institution; $title = “harnessing free content with web service apis”; $subtitle = “an ala editions workshop”; $author = “jason paul michel”; $position = “user experience librarian”; $institution = “miami university libraries”;

Upload: alatechsource

Post on 26-Jan-2015

107 views

Category:

Technology


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Harnessing Free Content with Web Service APIs

print $title;

print $subtitle;print $author;print $position;print $institution;

$title = “harnessing free content with web service apis”;$subtitle = “an ala editions workshop”;$author = “jason paul michel”;$position = “user experience librarian”;$institution = “miami university libraries”;

Page 2: Harnessing Free Content with Web Service APIs

agenda

• Discuss open web ecosystem • Place of APIs in that ecosystem• What is exactly is an API?• An example from the programmer’s

perspective• Real World examples• Slice of available APIs• What is needed for development• Where to find and keep up with information

Page 3: Harnessing Free Content with Web Service APIs

the “open” web ecosystem

• social web services are not social merely because of the interactions between users they facilitate.

• social web services are social because they also are able to talk to one another on a programmatic level.

Page 4: Harnessing Free Content with Web Service APIs

the “open” web ecosystem

• thus, If This Then That (ifttt.com)

Page 5: Harnessing Free Content with Web Service APIs

the “open” web ecosystem

• thus,

Page 6: Harnessing Free Content with Web Service APIs

the “open” web ecosystem

• Achieved largely through the use of APIs• API = Application Programming Interface• Method of data transfer via HTTP

Page 7: Harnessing Free Content with Web Service APIs

neighbor’s garage analogy

Open Source: take whatever you want, modify however you want,

use however you want

Proprietary: pay for each tool in the garage, use them as designed

API: utilize the services of the garage,

if you have authorization and ask the right way

Page 8: Harnessing Free Content with Web Service APIs

Why APIs?

• Increase visibility of data / service• Take advantage of the crowdsourcing

model to improve service, e.g. Tweetdeck

• From libraries’ perspective: its important to integrate with wider web environment

Page 9: Harnessing Free Content with Web Service APIs

Typical API Process

• Request API Key from Service• Choose scripting language: PHP, Ruby on Rails

etc.• Using chosen language, submit data request via

available API methods• Ingest that data in JSON, XML or other data type• Transform the data to make it usable with

scripting language• Upload data to a database • Wrap data in HTML, CSS for user interface

Page 10: Harnessing Free Content with Web Service APIs

api request example

https://api.twitter.com/1.1/search/tweet.json?q=book%20OR%20research

Base url

Each Web Service typically has several base urls depending on the type of information you are seeking and each resource type has its own set of parameters, e.g.:

https://api.twitter.com/1.1/followers/ids,https://api.twitter.com/1.1/friendships/lookup

Data type

Parameters

Page 11: Harnessing Free Content with Web Service APIs

api request example [statuses] => Array ( [0] => stdClass Object ( [metadata] => stdClass Object ( [result_type] => recent [iso_language_code] => en )

[created_at] => Sat Jul 20 16:25:22 +0000 2013 [id] => 3.58623679498E+17 [id_str] => 358623679497777153 [text] => This book just got too good! She said yes!! #christiangrey👏👰

[source] => Twitter for iPhone [truncated] => [in_reply_to_status_id] => [in_reply_to_status_id_str] => [in_reply_to_user_id] => [in_reply_to_user_id_str] => [in_reply_to_screen_name] => [user] => stdClass Object ( [id] => 307066025 [id_str] => 307066025 [name] => Alicia Reece [screen_name] => aaliciaaaajo [location] => etc…..

Page 12: Harnessing Free Content with Web Service APIs

api request example

• At this point you can send the data received to a database or create a dynamic web application on top of the live data.

Page 13: Harnessing Free Content with Web Service APIs

try it

• https://graph.facebook.com/username or

• https://graph.facebook.com/pageid

Page 14: Harnessing Free Content with Web Service APIs
Page 15: Harnessing Free Content with Web Service APIs
Page 16: Harnessing Free Content with Web Service APIs

working examples

Page 17: Harnessing Free Content with Web Service APIs

twitter

• Programmatically capture, store & display potentially relevant tweets in specific geolocation to serve as a springboard for proactive info services and social interaction.

https://api.twitter.com/1.1/search/tweet.json?q=book%20OR%20research&geocode=39.5069974,-84.745231,2mi&rpp=100

working examples

Page 18: Harnessing Free Content with Web Service APIs
Page 19: Harnessing Free Content with Web Service APIs

vimeo

• Upload video tutorials to Vimeo• Utilizing API, bring your own video tutorials in

to your own web interface.

http://vimeo.com/api/v2/miamiulibraries/videos.json

working examples

Page 20: Harnessing Free Content with Web Service APIs

vimeoworking examples

Page 21: Harnessing Free Content with Web Service APIs

instagram

• Create a patron-generated gallery of instagram images based on a pre-determined hashtag or keyword

https://api.instagram.com/v1/tags/miamioh/media/recent

working examples

Page 22: Harnessing Free Content with Web Service APIs

instagram

http://d.lib.ncsu.edu/myhuntlibrary

working examples

Page 23: Harnessing Free Content with Web Service APIs

instagramworking examples

Page 24: Harnessing Free Content with Web Service APIs

movieDB

• Utilizing the movieDB API, create a Netflix-style application with available Movie posters

http://themoviedb.apiary.io/3/search/movie

working examples

Page 25: Harnessing Free Content with Web Service APIs

movieDBworking examples

Page 26: Harnessing Free Content with Web Service APIs

worldcat

• Utilizing OCLC’s WorldCat Basic API, pull in citation information for catalog records.

http://www.worldcat.org/webservices/catalog/content/citations/isbn/1250012570?cformat=turabian&wskey=key

working examples

Page 27: Harnessing Free Content with Web Service APIs

worldcatworking examples

Page 28: Harnessing Free Content with Web Service APIs

goodreads

• Utilizing goodreads API, enhance catalog records with goodreads reviews.

http://www.goodreads.com/book/show?format=json&key=key&id=bookid

working examples

Page 29: Harnessing Free Content with Web Service APIs

goodreads exampleworking examples

Page 30: Harnessing Free Content with Web Service APIs

openlibrary/hathi/google books

• You don’t need to limit your catalog to what you own / subscribe to…

• There are web services out there with open content that your catalog can tap in to.

http://openlibrary.org/api/books?bibkeys=OCLC:4942988&jscmd=data&format=json

http://catalog.hathitrust.org/api/volumes/full/oclc/381593.json

working examples

Page 31: Harnessing Free Content with Web Service APIs

openlibrary/hathi/google booksworking examples

Page 32: Harnessing Free Content with Web Service APIs
Page 33: Harnessing Free Content with Web Service APIs
Page 34: Harnessing Free Content with Web Service APIs

openlibrary

• Enhance catalog with book covers.

http://covers.openlibrary.org/b/olid/OL7440033M-S.jpg

http://covers.openlibrary.org/b/$key/$value-$size.jpg

working examples

Page 35: Harnessing Free Content with Web Service APIs

flickr

• Bulk uploading images and metadata from repositories to flickr for wider audience

• Embedding flickr slideshows of own imagery stored in flickr

• Bringing in safe flickr content from current events / subjects

working examples

Page 36: Harnessing Free Content with Web Service APIs

Possible API Usages

Page 37: Harnessing Free Content with Web Service APIs

Social TrackingPossible API Usages

Page 38: Harnessing Free Content with Web Service APIs

Catalog Enhancements

Possible API Usages

Page 39: Harnessing Free Content with Web Service APIs

evernote & dropbox

• Export catalog records / lists of catalog records out to Evernote/Dropbox

• Export articles to Evernote/Dropbox

Possible API Usages

Catalog Enhancements

Page 40: Harnessing Free Content with Web Service APIs

rotten tomatoes

• Enhance movie records with Rotten Tomatoes reviews

• Retrieve cast, directors and movie posters

Possible API Usages

Catalog Enhancements

Page 41: Harnessing Free Content with Web Service APIs

ny times bestseller

• Get links to reviews of NY Times Bestsellers

• Get current NY Times Bestseller Lists and link to catalog records if available..

Possible API Usages

Catalog Enhancements

Page 42: Harnessing Free Content with Web Service APIs

DPLA

• Enhancing catalog records with DPLA content• DPLA content includes images, text, video

and sound• “an open, distributed network of

comprehensive online resources that would draw on the nation’s living heritage from libraries, universities, archives, and museums in order to educate, inform, and empower everyone in current and future generations.”

Possible API Usages

Catalog Enhancements

Page 43: Harnessing Free Content with Web Service APIs

hoover’s

• Get Company data to match potential company queries in catalog

Possible API Usages

Catalog Enhancements

Page 44: Harnessing Free Content with Web Service APIs

cambridge dictionaries online/oed

• Get definitions as an additional piece of content in catalog search

Possible API Usages

Catalog Enhancements

Page 45: Harnessing Free Content with Web Service APIs

mendeley

• export citation data from catalog

Possible API Usages

Catalog Enhancements

Page 46: Harnessing Free Content with Web Service APIs

OA APIs

• CORE Project – Open University• ArXiv• Hathi • Open Library

Possible API Usages

Catalog Enhancements

Page 47: Harnessing Free Content with Web Service APIs

Single Interface Utopia?

Possible API Usages

Page 48: Harnessing Free Content with Web Service APIs

ILS & Discovery Layer APIs

• ILSs and Discover Layers are increasingly adding APIs…

• Ebsco EDS• Summon• VUFind• Koha• These APIs allow developers to

create their own interfaces..

Possible API Usages

Single Interface

Page 49: Harnessing Free Content with Web Service APIs

Publisher APIs

• IEEE Xplore • Springer• Elsevier: SciVerse (Scopus,

ScienceDirect, SciVerse Hub)• Cambridge Journals• Cambridge Dictionaries• And more….

Possible API Usages

Single Interface

Page 50: Harnessing Free Content with Web Service APIs

Vendor APIs

• Factiva – integrate all of factiva’s content

• Hoover’s – integrate company information

• And more…

Possible API Usages

Single Interface

Page 51: Harnessing Free Content with Web Service APIs

OA APIs

• CORE Project – Open University• arXiv• Open Library• Hathi Trust

Possible API Usages

Single User Interface

Page 52: Harnessing Free Content with Web Service APIs

API Development : what is needed?

• Programming expertise: PHP, Ruby, Python, Javascript, XML, JSON, SQL, HTML, CSS

• Invest subject librarians in the process: what APIs are available per discipline, which offers value?

• Usability assessment• Development tools: programming

software and hardware

Page 53: Harnessing Free Content with Web Service APIs

Further resources

• Programmable Web• Zite(app): APIs• Web Service APIs and Libraries, ALA

Editions• eCourse in October• Twitter: @kinlane, @hackernews

Page 54: Harnessing Free Content with Web Service APIs

thank you!

[email protected]• @jpmichel• gplus.to/jpmichel (G+)

Page 55: Harnessing Free Content with Web Service APIs

References• http://ifttt.com• https://dev.twitter.com/• https://developers.facebook.com/docs/reference/api/• https://developer.vimeo.com/• http://instagram.com/developer/• http://www.themoviedb.org/• http://oclc.org/developer/documentation/worldcat-basic-api/using-

api• http://www.goodreads.com/api• http://openlibrary.org/developers/api• http://www.hathitrust.org/data_api• http://www.flickr.com/services/api/• http://dev.evernote.com/• https://www.dropbox.com/developers• http://developer.rottentomatoes.com/• http://developer.nytimes.com/docs

Page 56: Harnessing Free Content with Web Service APIs

References• http://dp.la/info/developers/codex/• http://developer.hoovers.com/• http://core.kmi.open.ac.uk/intro/api• http://arxiv.org/help/api/index• http://dictionary-api.cambridge.org/• http://public.oed.com/subscriber-services/sru-service/• http://dev.mendeley.com/• https://www.ebscohost.com/discovery/api• http://api.summon.serialssolutions.com/• http://vufind.org/features.php• http://dev.springer.com/• http://ieeexplore.ieee.org/gateway/• http://www.developers.elsevier.com/devcms/scopusintegration• http://journals.cambridge.org/action/stream?pageId=9048&level=2• http://www.factiva.com/CP_Developer/ProductHelp/FDK/FDK20/

fdk_overview/index.htm