TIAPI

From tango.info wiki
Revision as of 2014-02-09T01:43:21 by Qwertyui (talk | contribs)
Jump to navigation Jump to search

Overview

TIAPI = TI-API = API for tango.info


Ideally this will be a RESTful API. It will provide the ability to list collections and retrieve tracks from a collections. The object of the API is to provide a dynamic way to read from the tango.info library.

  • All API quries are sent to a base URI (i.e. http://tango.info/API/ )
  • Only GET methods are used as the API isn't planned to support modifying the database.
  • All responses are a single internet media type (standard for the site is still undecided).
  • Any response making reference to related resources are hypertext links.


Listing Collections

  • HTTP GET method is sent from the user to a collection URI (i.e. http://tango.info/API/artist="D'Arienzo'/track_name="El Flete"/ ).
  • The tango.info library is quired for the specified collection.
  • A internet media type object is created matching the collection requested containing:
    • Track Name
    • Orchestra
    • Artist
    • Vocalist
    • Album
    • TINP as a hypertext link
    • Year
    • Duration
    • TINT as a hypertext link
    • (possibly more as needed)
  • An HTTP response is sent back to the user containing the collection results.


Retrieving A Track's Meta Info

  • HTTP GET method is sent from the user to a track URI (i.e. http://tango.info/API/00743217137229-1-4 ).
  • The tango.info library is quired for the specified track.
  • A internet media type object is created containing all the tracks meta information.
  • An HTTP response is sent back to the user containing the collection results.


URI Structure

The structure of the URI could take on many forms:


Return Format

Any Internet media format works as a return format. The key is that it is a standard form so the user knows what to expect. If there is a need to the output to be in a different format there are many conversion tools to do this (i.e. https://code.google.com/p/xml2json-xslt/ )


Options

  • csv?
  • xml - could be used for the whole site
  • json?