Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Creating Library Web
      Services:
  Mashups and APIs
        Karen A. Coombs
   lirbarywebchic@gmail.com
About Me



• ~ 10 Years library web stuff
• Self taught coder who loves to play
• Work with developers regularly
About You

• Name
• Institution
• Techie skills
 • HTML, Javascript, DOM, XML,
   Server side scripting (PHP, ASP, Rails,
...
What Is A Mashup?



• a Web application that uses and/or
  combines data from multiple sources
  within a single tool
Why Create A Mashup
• Want to bring together disparate data
  sources
• Want to enhance a existing source of
  data
• Want...
Some Library Mashups
• LibraryFind
• Repository 66
• Scriblio
• Terrapod Project
• Texas A&M Geologic Atlas of the US
• Vu...
Mashups Don’t have to
    Be Read Only
• Web Services can be capable of read/
  write
• A mashup could write data as part ...
How Do Mashups Work?


• Take existing data within a system
• Retrieve data from another source(s)
  typically via a web s...
Technologies Behind
      the scenes


• Web Services (REST, SOAP, XML-RPC)
• Some server side or client side scripting
  ...
What are Web Services?

• Machine readable data or procedures
  access via HTTP
• On a remote/external system (usually)
• ...
REST Primer

• Easiest web service style
• Readable by Humans
• Most popular form of web services
  today
• Create, Read, ...
What is JSON?

• Javascript Object Notation
• Text file used to pass information from
  one system to another
• Javascript ...
ProcessGBSBookInfo({
  "ISBN0765304368":{
      "bib_key":"ISBN0765304368",
      "info_url":"http://books.google.com/book...
XML Data Manipulation

• XPath
• Little bit like the DOM but more
  complex and smart
• Allows you to cherry pick info in ...
XML XPATH EXAMPLE



• Want to get the feed name
• Want to get the item title, description,
  and url
The XPath


• Feed Title - /feed/title
• Item title - //entry/title or /feed/
  entry/title
• Item Content - //entry/conte...
Cross Server Scripting
        Issues
• AJAX doesn’t allow you to access
  “scripts” across servers
 • XML, PHP or other s...
Cross Server Scripting
    Workarounds

• Proxy the script via the webserver
 • Apache mod_proxy
• Use an intermediary to ...
Possible Types Of Data
• Bibliographic Data
• Book Covers
• Digital Library metadata and objects
• Reviews
• Ratings
• Lib...
Data Sources For
         Mashups
• Feeds from library catalog, Amazon or other
  sources
• Covers, Ratings and Reviews fr...
Other Library Vendor
         Web Services
• Serial Solutions - http://journal.code4lib.org/
  articles/108
• SFX
• Gold R...
OCLC Web Services
     for Mashups
• WorldCat Search API
• WorldCat Identities
• xID services
  • xISBN
  • xISSN
  • xOCL...
WorldCat Search API


• Search WorldCat in a programmatic
  fashion
 • OpenSearch, SRU
• Get data back as XML
 • Atom, RSS...
xID Service
• Service for identifiers
 • OCLC number, ISSN, ISBN
• Send an identifier
• Get related identifiers back
• Get in...
Worldcat Registry

• Data about libraries throughout the
  world
 • Name
 • Address
 • Catalog url
 • Type (public, academ...
Serial Solutions API

• OpenURL based
• Send an OpenURL
• Get back holdings information
• Uses
 • Crosslisting ebooks
 • D...
Serial Solutions API
       Response

• Citation
• Holdings Info
 • Provider - Proquest
 • Database Name - Safari Tech Boo...
Serial Solution
       Response URLs
• Different types of URLs
• Depends on OpenURL sent
  • format
  • granularity
• Book...
Crosslisting Ebooks
Direct Links to Fulltext
     in LibraryFind
Other APIs We’re Using
• Google Calendar API - http://
  code.google.com/apis/calendar/
  data/2.0/developers_guide.html
•...
Other APIs of Note

• Blip.tv API - http://wiki.blip.tv/index.php/
  Blip.tv_API
• Delicious API - http://delicious.com/he...
The Simplest Mashups

• Widgets
 • Google Embedded Preview
 • LibraryThing Widgets
 • Flickr Widgets
 • WorldCat list widg...
The Simplest Mashups
• Feeds
 • The poor man’s web services
 • XML
 • Can have schemas added to them
• Feed2JS
 • embed a ...
Mashups Made Easy
    With Yahoo Pipes

• Drag and drop UI for creating mashups
• Free
• Lots of examples
• Some library e...
Why Use Pipes?
• Programming for non-programmers
• Good user community
• Clone!!
• End up with a variety of formats
 • Wid...
Feed Remix with Pipes


• Find several feed you want to mix
  together
• Get their feed urls
• Filter if you want
• New Fe...
WorldCat Search
     + Book Covers
• RSS + Cover Data + Yahoo Pipes
• ISBN essential
• How does it work?
 • RSS feed from ...
WorldCat Registry
     + Yahoo Maps

• Send registry request for data for a
  particular location (zip code, city)
• Retri...
WorldCat Holdings
     + Yahoo Maps
• Send an OCLC number and location to
  WorldCat Search API
• Returns a list of librar...
Crosslisting Content
    In the Catalog

• Serial Solutions OpenURL Resolver
 • API
• WorldCat Search API
• ISBN/ISSN
• Ad...
Four Code
       Walkthroughs

• Google Calendar Embedding
• WorldCat Search + Book Covers +
  Ratings + Preview at Google...
Web Services for
     Interoperability

• Lots of different ways in which people
  can access information
• Different devi...
Mobile Catalog
        Prototype
• WorldCat Search API
• Open Library/LibraryThing Covers
• Summary - ISBNdb.com
• Full te...
Library Mashups & APIs
Library Mashups & APIs
Library Mashups & APIs
Library Mashups & APIs
Library Mashups & APIs
Library Mashups & APIs
Library Mashups & APIs
Library Mashups & APIs
Library Mashups & APIs
Library Mashups & APIs
Library Mashups & APIs
Library Mashups & APIs
Library Mashups & APIs
Library Mashups & APIs
Upcoming SlideShare
Loading in …5
×

Library Mashups & APIs

0 views

Published on

Published in: Technology
  • Be the first to comment

Library Mashups & APIs

  1. 1. Creating Library Web Services: Mashups and APIs Karen A. Coombs lirbarywebchic@gmail.com
  2. 2. About Me • ~ 10 Years library web stuff • Self taught coder who loves to play • Work with developers regularly
  3. 3. About You • Name • Institution • Techie skills • HTML, Javascript, DOM, XML, Server side scripting (PHP, ASP, Rails, Coldfusion...) • What you want to learn today
  4. 4. What Is A Mashup? • a Web application that uses and/or combines data from multiple sources within a single tool
  5. 5. Why Create A Mashup • Want to bring together disparate data sources • Want to enhance a existing source of data • Want to improve usability and user interfaces • Want to make a web page more dynamic and engaging
  6. 6. Some Library Mashups • LibraryFind • Repository 66 • Scriblio • Terrapod Project • Texas A&M Geologic Atlas of the US • VuFind implementations • WorldCat Search plugin for FCKEditor
  7. 7. Mashups Don’t have to Be Read Only • Web Services can be capable of read/ write • A mashup could write data as part of its functionality • Examples • Flickr Manager plugin for Wordpress • Kaltura plugin for Wordpress
  8. 8. How Do Mashups Work? • Take existing data within a system • Retrieve data from another source(s) typically via a web service • Mix these datasets together for UI purposes
  9. 9. Technologies Behind the scenes • Web Services (REST, SOAP, XML-RPC) • Some server side or client side scripting language • Data formated in XML or JSON
  10. 10. What are Web Services? • Machine readable data or procedures access via HTTP • On a remote/external system (usually) • Use structured data for data exchange (often XML) • Come in 3 flavors : RPC, SOAP, REST
  11. 11. REST Primer • Easiest web service style • Readable by Humans • Most popular form of web services today • Create, Read, Update Delete • POST, GET, PUT, DELETE
  12. 12. What is JSON? • Javascript Object Notation • Text file used to pass information from one system to another • Javascript treats it as an object • which makes it easily navigated and specific pieces cherry-picked
  13. 13. ProcessGBSBookInfo({ "ISBN0765304368":{ "bib_key":"ISBN0765304368", "info_url":"http://books.google.com/books? id=gfg13CM_kU8C&source=gbs_ViewAPI", "preview_url":"http://books.google.com/books? id=gfg13CM_kU8C&printsec=frontcover&sig=jIrSb_Skc QRhy_VvtnKbTXjmvos&source=gbs_ViewAPI", "thumbnail_url":"http://books.google.com/books? id=gfg13CM_kU8C&pg=PP1&img=1&zoom=5&sig=LsT wGVAsy_qWYMPM6HVDTPAMokg", "preview":"full" } });
  14. 14. XML Data Manipulation • XPath • Little bit like the DOM but more complex and smart • Allows you to cherry pick info in XML documents • Learn more about XPath - http:// www.w3schools.com/xpath
  15. 15. XML XPATH EXAMPLE • Want to get the feed name • Want to get the item title, description, and url
  16. 16. The XPath • Feed Title - /feed/title • Item title - //entry/title or /feed/ entry/title • Item Content - //entry/content • Item Url - //entry/link@href
  17. 17. Cross Server Scripting Issues • AJAX doesn’t allow you to access “scripts” across servers • XML, PHP or other scripting languages • Can access JSON across servers • Reason why JSON popular • Workaround
  18. 18. Cross Server Scripting Workarounds • Proxy the script via the webserver • Apache mod_proxy • Use an intermediary to transform content into JSON • Use PHP to convert XML to JSON
  19. 19. Possible Types Of Data • Bibliographic Data • Book Covers • Digital Library metadata and objects • Reviews • Ratings • Library Information • Map Data
  20. 20. Data Sources For Mashups • Feeds from library catalog, Amazon or other sources • Covers, Ratings and Reviews from LibraryThing • ISBNdb.com • Preview or fulltext from GoogleBooks • Info from Wikipedia • Data from Talis platform • Data from Open Library
  21. 21. Other Library Vendor Web Services • Serial Solutions - http://journal.code4lib.org/ articles/108 • SFX • Gold Rush Link Resolver - http:// grx.coalliance.org/grxtest/dsp/ grx_documentation.pdf • Lots of library database platforms • Several library catalogs
  22. 22. OCLC Web Services for Mashups • WorldCat Search API • WorldCat Identities • xID services • xISBN • xISSN • xOCLCNum • Registry Search • Registry Detail
  23. 23. WorldCat Search API • Search WorldCat in a programmatic fashion • OpenSearch, SRU • Get data back as XML • Atom, RSS, MARCXML, Dublin Core
  24. 24. xID Service • Service for identifiers • OCLC number, ISSN, ISBN • Send an identifier • Get related identifiers back • Get information about item • Peer Reviewed or not • RSS for Table of Contents
  25. 25. Worldcat Registry • Data about libraries throughout the world • Name • Address • Catalog url • Type (public, academic, special ...)
  26. 26. Serial Solutions API • OpenURL based • Send an OpenURL • Get back holdings information • Uses • Crosslisting ebooks • Direct Links to Fulltext in LibraryFind
  27. 27. Serial Solutions API Response • Citation • Holdings Info • Provider - Proquest • Database Name - Safari Tech Books • Start & End Dates • URL(s)
  28. 28. Serial Solution Response URLs • Different types of URLs • Depends on OpenURL sent • format • granularity • Books - source, book • Journal - source, article, journal, volume, issue
  29. 29. Crosslisting Ebooks
  30. 30. Direct Links to Fulltext in LibraryFind
  31. 31. Other APIs We’re Using • Google Calendar API - http:// code.google.com/apis/calendar/ data/2.0/developers_guide.html • Google Maps - http:// code.google.com/apis/maps/ • Last.fm - http://www.last.fm.api • Wikipedia API - http:// en.wikipedia.org/w/api.php
  32. 32. Other APIs of Note • Blip.tv API - http://wiki.blip.tv/index.php/ Blip.tv_API • Delicious API - http://delicious.com/help/api • Flickr API - http://www.flickr.com/services/api/ • YouTube API - http://code.google.com/apis/ youtube/overview.html • Yahoo Maps API - http://developer.yahoo.com/ maps/
  33. 33. The Simplest Mashups • Widgets • Google Embedded Preview • LibraryThing Widgets • Flickr Widgets • WorldCat list widget • Yahoo Pipes
  34. 34. The Simplest Mashups • Feeds • The poor man’s web services • XML • Can have schemas added to them • Feed2JS • embed a feed in a web page • Drupal and Wordpress can have feeds embedded into pages
  35. 35. Mashups Made Easy With Yahoo Pipes • Drag and drop UI for creating mashups • Free • Lots of examples • Some library examples • RSS of Books + Covers • Finding Alternative Copies of a Book
  36. 36. Why Use Pipes? • Programming for non-programmers • Good user community • Clone!! • End up with a variety of formats • Widgets • RSS • JSON • PHP
  37. 37. Feed Remix with Pipes • Find several feed you want to mix together • Get their feed urls • Filter if you want • New Feed output
  38. 38. WorldCat Search + Book Covers • RSS + Cover Data + Yahoo Pipes • ISBN essential • How does it work? • RSS feed from WorldCat Search API • Extracts ISBN • Gets cover data • Builds new feed with covers
  39. 39. WorldCat Registry + Yahoo Maps • Send registry request for data for a particular location (zip code, city) • Retrieve results • Send address information to Yahoo Maps • Get library locations plotted on map
  40. 40. WorldCat Holdings + Yahoo Maps • Send an OCLC number and location to WorldCat Search API • Returns a list of libraries nearest that location with holdings (includes address) • Send libraries’ address to Yahoo Maps • See which libraries in that location have that book visualized
  41. 41. Crosslisting Content In the Catalog • Serial Solutions OpenURL Resolver • API • WorldCat Search API • ISBN/ISSN • Adds also available as link to ebook print book
  42. 42. Four Code Walkthroughs • Google Calendar Embedding • WorldCat Search + Book Covers + Ratings + Preview at Google Books • WorldCat Search Holdings + Google Maps • Journal List Enhancements
  43. 43. Web Services for Interoperability • Lots of different ways in which people can access information • Different devices • Mobile devices, computers, special purpose devices • Machine access to data
  44. 44. Mobile Catalog Prototype • WorldCat Search API • Open Library/LibraryThing Covers • Summary - ISBNdb.com • Full text/Preview • Hathi Trust • Google Books • Screenscrape Item data

×