| sidebar_position | 3 |
|---|
import ApiCodeBlock from '../../src/components/ApiCodeBlock'; import Highlight from '../../src/components/Highlight'; import ApiTryIt from '../../src/components/ApiTryIt';
export const endpoints = [ { method: 'GET', uri: '/v1/song/:id' }, { method: 'GET', uri: '/v1/song' }, { method: 'GET', uri: '/v1/random/song/:count' }, ];
This is an object representing an Anime show's opening or ending song. The API allows you to retrieve individual Song as well as a list of them using various filters.
Unique identifier for a Song.
Anime external unique identifier.
The song's original title.
The song's artist name.
The song's album name.
The song's release year.
The song's release season.
"WINTER": 0,
"SPRING": 1,
"SUMMER": 2,
"FALL": 3,
"UNKNOWN": 4The song's duration in milliseconds.
The song's Spotify preview url, which provides ~30 seconds of the song.
The song's Spotify Web Player url to listen to it.
The song's Spotify App url to listen to it. This url will open your local Spotify application automatically.
The song's type.
"OPENING": 0,
"ENDING": 1,
"NONE": 2{
"anime_id": 1,
"title": "The Real Folk Blues",
"artist": "Mai Yamane",
"album": "COWBOY BEBOP Vitaminless",
"year": 1998,
"season": 1,
"duration": 377066,
"preview_url": "https://p.scdn.co/mp3-preview/a2226076e4b89e16d8827189fd32da4535d369b4?cid=b074c52808fb4394a28785f381872ea2",
"open_spotify_url": "https://open.spotify.com/track/5Cmf3LmbLd9g79rS55X7qK",
"local_spotify_url": "spotify:track:5Cmf3LmbLd9g79rS55X7qK",
"type": 1,
"id": 1
}Retrieves an Anime show's Song, based on its unique identifier.
No parameters.
Returns a Song object if a valid identifier was provided.
export const retrieveSongParams = [ { name: ':id', type: 'number', placeholder: ':id', value: '11' } ];
Returns a list of Song objects.
The Songs are returned sorted by year descending, after by season descending.
A filter on the list based on the anime_id field value.
A case-insensitive pattern filter on the list based on the title field value.
A case-insensitive pattern filter on the list based on the artist field value.
A filter on the list based on the year field value.
A filter on the list based on the season field value.
A filter on the list based on the type field value.
Returns an array of Anime objects with a size based on the filter provided.
export const getListSongParams = [ { name: 'anime_id', type: 'number', placeholder: 'anime_id', value: '10' }, { name: 'title', type: 'text', placeholder: 'title', value: '' }, { name: 'artist', type: 'text', placeholder: 'artist', value: 'FLOW' }, { name: 'year', type: 'text', placeholder: 'year', value: '' }, { name: 'season', type: 'text', placeholder: 'season', value: '' }, { name: 'type', type: 'text', placeholder: 'type', value: '' }, ];
Retrieves a random Anime show's Song list.
No parameters.
Returns a random Song list.
export const retrieveRandomSongParams = [ { name: ':count', type: 'number', placeholder: ':count', value: '5' } ];