TIAPI: Difference between revisions
Jump to navigation
Jump to search
New page: TIAPI = TI-API = API for tango.info |
No edit summary |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
==Overview== | |||
TIAPI = TI-API = [[API]] for [[tango.info]] | TIAPI = TI-API = [[API]] for [[tango.info]] | ||
Ideally this will be a [http://en.wikipedia.org/wiki/Representational_state_transfer 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/TINT/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: | |||
* Parsed as a directory structure: | |||
** http://tango.info/API/artist/D'Arienzo/track_name/El Flete/ | |||
* Parsed as query string: | |||
** http://tango.info/API?artist=Diaz&track_name=Embrujo | |||
==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? |
Latest revision as of 2014-02-09T21:35:05
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/TINT/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:
- Parsed as a directory structure:
- Parsed as query string:
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?