MyLibrary2Atom, or Web Services revisited
How could MyLibrary content be used/exploited if the content were accessible via Web Services? Put another way, if there were an HTTP-based method for syndicating MyLibrary content in Atom or JSON formats, then how might the content be put to use?
Attached somewhere in this posting should be a Perl script called mylibrary2atom. The script is bare-bones. It takes 1 or 2 inputs and outputs a stream of Atom-based XML. The first input is the word facets, terms, or resources. The second, optional input, is an integer representing the ID of a facet, term, or resource. The result sent to STDOUT is a valid Atom feed readable and tranformable by any Atom feed reader or XSLT processor. Through the use of an additional Perl module (Google::Data::JSON) and about two additional lines of code, the script should be able to output the data in JSON format as well.
If mylibrary2atom were made into a Web Service, I think the URLs accessing the data might look something like this:
- http://example.org/mylibrary/ - list MyLibrary resource object names (facets, terms, resources, patrons, librarians) with links specific objects
- http://example.org/mylibrary/facets - list all facets with links to specific facets
- http://example.org/mylibrarya/facets/3 - list facet ID #3 and links to child terms
- http://example.org/mylibrary/terms - list all terms with links to specfic terms
- http://example.org/mylibrary/terms/4 - list term ID #4 with links to related resources
- http://example.org/mylibrary/resources - list all resources with links to specific resources
- http://example.org/mylibrary/resources/2 - list resource ID #2
- http://example.org/mylibrary/librarians - list all librarians with links to specific librarians
- http://example.org/mylibrary/librarians/7 - list library ID #7
- http://example.org/mylibrary/patrons - list all patrons
- http://example.org/mylibrary/patrons/9 - list patron ID #9
In a Web Services-based interface, each one of these URLs would return either an Atom feed or a JSON object. Given this, what sorts of new and different ways might MyLibrary data used? To answer my own question, the connent could be accessed using a client written in something other than Perl — no need to know the Perl MyLibrary API. Other than that how can the content be inserted and used to provide alternative services?
Discussion Area - Leave a Comment
You must be logged in to post a comment.