-> Send to a friend

LyricWiki:REST

From LyricWiki

Jump to: navigation, search

Contents

LyricWiki:REST

The REST API is an alternative method of accessing the same backend as the SOAP. The primary difference being that the SOAP uses a standardized XML format and the REST allows you to make simple requests through the command-line.

How to use the REST API

Making a request

Requests are made by passing parameters in through the URL for the function and optionally supplying a format for the response.

A request should contain:

  1. func - The function name to call (eg: getSong). NOTE: WHILE THE REST IS BEING DEVELOPED, TEMPORARILY ONLY THE getSong FUNCTION IS AVAILABLE. IF YOU NEED OTHER FUNCTIONS SOON... RATTLE MY CAGE. If you would like to simulate the results of a getArtist() request, just pass in an artist and no song.
  2. ... - All other options should be specified by key-value pairs. So since getSong() takes 'artist' and 'song' parameters, you need to pass in 'artist' and 'song' through the url.
  3. fmt - Optional format of the response. See Response Formats below.

Example requests

Response Formats

The format of the response is specified by the 'fmt' parameter. This case-insensitive value defaults to 'html'.

  1. HTML (default) - Lightly formatted lyrics result. Example HTML lyrics.
  2. TEXT - Raw lyrics. Other fields are not returned. Example of just text lyrics.
  3. XML - Light-weight XML version of the same values that the SOAP would return. Example of lyrics in xml.

Samples that use REST

  • Flash Song Search, A Free and Easy-to-use Flash to get lyrics:
    It's web base, so you can use it without installing anything except web browser and flash.
    The project's link: http://lyricapi.googlepages.com/main-en.html

Documentation on each function/method

For details about the input and output of each function/method please refer to the SOAP's request/response documentation.

Personal tools
LyricWiki Challenge
LyricWiki Challenge + Facebook App
Try the LyricWiki Challenge
Facebook App!
Friend spotlight (info)
Wookieepedia - The Star Wars Wiki

why the ad?