Plugin Models
Different types of objects used in Spotube.
Image
Following is the structure of the SpotubeImageObject:
| Property | Type |
|---|---|
| width | int or null |
| height | int or null |
| url | string |
User
Structure of the SpotubeUserObject, which is used to represent a user in Spotube returned by Spotube Plugins.
| Property | Type |
|---|---|
| id | string |
| name | string |
| externalUri | string |
| images | List of SpotubeImageObject |
externalUriis a URL that points to the user's profile on the external service (e.g. Listenbrainz)
Artist
SpotubeSimpleArtistObject
Following is the structure of the SpotubeArtistObject:
| Property | Type |
|---|---|
| id | string |
| name | string |
| externalUri | string |
| images | List of SpotubeImageObject or null |
SpotubeFullArtistObject
Following is the structure of the SpotubeFullArtistObject:
| Property | Type |
|---|---|
| id | string |
| name | string |
| externalUri | string |
| images | List of SpotubeImageObject or |
| followers | number |
| genres | List of string or null |
Album
SpotubeSimpleAlbumObject
Following is the structure of the SpotubeAlbumObject:
| Property | Type |
|---|---|
| id | string |
| name | string |
| externalUri | string |
| images | List of SpotubeImageObject |
| albumType | album, single or compilation |
| artists | List of SpotubeSimpleArtistObject |
| releaseDate | string (YYYY-MM-DD format) or null |
SpotubeFullAlbumObject
Following is the structure of the SpotubeFullAlbumObject:
| Property | Type |
|---|---|
| id | string |
| name | string |
| externalUri | string |
| images | List of SpotubeImageObject |
| albumType | album, single or compilation |
| artists | List of SpotubeSimpleArtistObject |
| releaseDate | string (YYYY-MM-DD format) |
| totalTracks | number |
| recordLabel | string or null |
Track
Following is the structure of the SpotubeFullTrackObject:
| Property | Type |
|---|---|
| id | string |
| name | string |
| externalUri | string |
| artists | List of SpotubeSimpleArtistObject |
| album | SpotubeSimpleAlbumObject |
| durationMs (in milliseconds) | number |
| explicit | boolean |
| isrc | string |
isrcstands for International Standard Recording Code, which is a unique identifier for tracks. It is used to identify recordings and is often used in music distribution and royalty collection. The format is typically a 12-character alphanumeric code.
Playlist
SpotubeSimplePlaylistObject
Following is the structure of the SpotubeSimplePlaylistObject:
| Property | Type |
|---|---|
| id | string |
| name | string |
| description | string |
| externalUri | string |
| images | List of SpotubeImageObject or null |
| owner | SpotubeUserObject |
SpotubeFullPlaylistObject
Following is the structure of the SpotubeFullPlaylistObject:
| Property | Type |
|---|---|
| id | string |
| name | string |
| description | string |
| externalUri | string |
| images | List of SpotubeImageObject or null |
| owner | SpotubeUserObject |
| collaborators | List of SpotubeUserObject or null |
| collaborative | boolean |
| public | boolean |
Search Response
Following is the structure of the SpotubeSearchResponseObject:
| Property | Type |
|---|---|
| albums | List of SpotubeSimpleAlbumObject |
| artists | List of SpotubeFullArtistObject |
| playlists | List of SpotubeSimplePlaylistObject |
| tracks | List of SpotubeFullTrackObject |
Browse Section
Following is the structure of SpotubeBrowseSectionObject:
| Property | Type |
|---|---|
| id | string |
| title | string |
| externalUri | string |
| browseMore | boolean |
| items | List of Object |
The items property array can contain multiple type of Object in it but it will always be
Pagination Response
SpotubePaginationResponseObject is generic model. The items property can contain any type of Object in it.
This is the structure of SpotubePaginationResponseObject:
| Property | Type |
|---|---|
| limit | number |
| nextOffset | number or null |
| total | number |
| hasMore | boolean |
| items | List of generic type T which extends Object |
