Harnessing Free Content with Web Service APIs
-
Upload
alatechsource -
Category
Technology
-
view
107 -
download
1
description
Transcript of Harnessing Free Content with Web Service APIs
![Page 1: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/1.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/2.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/3.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/4.jpg)
the “open” web ecosystem
• thus, If This Then That (ifttt.com)
![Page 5: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/5.jpg)
the “open” web ecosystem
• thus,
![Page 6: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/6.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/7.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/8.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/9.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/10.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/11.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/12.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/13.jpg)
try it
• https://graph.facebook.com/username or
• https://graph.facebook.com/pageid
![Page 14: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/14.jpg)
![Page 15: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/15.jpg)
![Page 16: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/16.jpg)
working examples
![Page 17: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/17.jpg)
• 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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/18.jpg)
![Page 19: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/19.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/20.jpg)
vimeoworking examples
![Page 21: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/21.jpg)
• 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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/22.jpg)
http://d.lib.ncsu.edu/myhuntlibrary
working examples
![Page 23: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/23.jpg)
instagramworking examples
![Page 24: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/24.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/25.jpg)
movieDBworking examples
![Page 26: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/26.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/27.jpg)
worldcatworking examples
![Page 28: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/28.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/29.jpg)
goodreads exampleworking examples
![Page 30: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/30.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/31.jpg)
openlibrary/hathi/google booksworking examples
![Page 32: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/32.jpg)
![Page 33: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/33.jpg)
![Page 34: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/34.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/35.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/36.jpg)
Possible API Usages
![Page 37: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/37.jpg)
Social TrackingPossible API Usages
![Page 38: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/38.jpg)
Catalog Enhancements
Possible API Usages
![Page 39: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/39.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/40.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/41.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/42.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/43.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/44.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/45.jpg)
mendeley
• export citation data from catalog
Possible API Usages
Catalog Enhancements
![Page 46: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/46.jpg)
OA APIs
• CORE Project – Open University• ArXiv• Hathi • Open Library
Possible API Usages
Catalog Enhancements
![Page 47: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/47.jpg)
Single Interface Utopia?
Possible API Usages
![Page 48: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/48.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/49.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/50.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/51.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/52.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/53.jpg)
Further resources
• Programmable Web• Zite(app): APIs• Web Service APIs and Libraries, ALA
Editions• eCourse in October• Twitter: @kinlane, @hackernews
![Page 55: Harnessing Free Content with Web Service APIs](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/55.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062617/54c65b2f4a795934598b4588/html5/thumbnails/56.jpg)
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