The current version of the neighbortunes API version is v2
.
All valid requests to the API will begin with https://neighbortunes.net/api/v2. If you use that URL without any further data, it will return HTTP 204, no valid method found.
setlists
- display setlist datalatest
- display most recent show setlist datashows
- display show datasongs
- display song datavenues
- display venue datajamcharts
- display jam chart dataalbums
- display data related to discographymetadata
- display setlist metadata links
- display links attached to showsuploads
- display show metadata, including poster art and featured images/[version]/[method].[format]
/[version]/[method]/[ID].[format]
/[version]/[method]/[column]/[value].[format]
There is no authentication for API calls - no token or key is necessary. No data is passed via POST or HEAD requests, only by URI and, optionally, by GET parameters in the query string.
Additional parameters may be passed via query string:
order_by
: name of column to sort bydirection
: direction to sort, either asc
or desc
(default asc
)limit
: number, maximum number of results to returne.g., /[version]/[method]/[column]/[value].[format]?order_by=[column]&direction=[direction]
API version 2 data is available in the following formats: JSON (.json) and HTML (.html).
The following are valid URLs to call the API:
If your request contains an error, you may end up with unexpected output. If your request URI contains a typos, uses improper case, or requests or sorts by a nonexistent column, you may end up with no data in your response.
If you use the HTML format – an error will display "No results found.".
The JSON format works a bit differently. Every JSON response is has three return nodes: error
, error_message
, and data
. A successful response will contain error
0, a blank error_message
, and a data
object populated with your response. An error response will contain error
1, a text-based error message
, and a blank data
object.
You can embed a setlist in a remote website via iframe or Javascript. In both cases, a URL is constructed like so: https://neighbortunes.net/api/embed/{arg}.html.
{arg} must be one of the following:
In all cases, the .html extension is optional. Here is example code for a valid embed:
<iframe src="https://neighbortunes.net/api/embed/2019-08-06.html"></iframe>
Another way would be to add the following in <script>
tags. Since you won't want a full HTML document, make sure you add headless=1 to the URL:
const response = await fetch('https://neighbortunes.net/api/embed/2019-08-06.html?headless=1');
const body = await response.text();
document.querySelector('#some.selector').innerHTML = body;
or, using jQuery:
$('#some.selector').load('https://neighbortunes.net/api/embed/2019-08-06.html?headless=1');