Base URL: https://plug.dj/_
Field | Type | Description |
---|---|---|
data | array | endpoint-specific return data |
meta | object | unknown |
status | string | unknown - success of the request? |
time | float | unknown - time to process request? |
{
"data": [],
"meta": {},
"status": "ok",
"time": 26.842117309570312
}
Playlists represent a sorted collection of media.
Field | Type | Description |
---|---|---|
active? | boolean | whether or not the playlist is active |
count | integer | quantity of media in the playlist |
id | integer | playlist's id |
name? | string | playlist's name |
{
"active": false,
"count": 0,
"id": 11545358,
"name": "test"
}
Returns playlist objects for the currently authenticated user.
The objects are sorted by the id
field in descending order.
Creates a new playlist. Returns the created playlist object.
Field | Type | Description |
---|---|---|
media? | array of media objects | media with which to populate the playlist |
name | string | playlist's name |
Deletes a playlist.
Renames a playlist.
Field | Type | Description |
---|---|---|
name | string | new name for the playlist |
Media represents some audio or video hosted on an external site.
Field | Type | Description |
---|---|---|
author | string | media's artist |
cid | string | content id used by the media's host |
duration | string | media's duration in seconds |
format | string | media's format - where it is hosted |
id | integer | media's id |
image | string | thumbnail url |
title | string | media's title |
{
"author": "Weast",
"cid": "lr-zXfbdXow",
"duration": 326,
"format": 1,
"id": 384246963,
"image": "https://i.ytimg.com/vi/lr-zXfbdXow/default.jpg",
"title": "Cocola"
}
Value | Description |
---|---|
1 | YouTube |
2 | SoundCloud |
Returns media objects for the given playlist.
Adds new or existing media to the given playlist. Returns the updated partial playlist object.
Note: To add new media, create media objects with the
id
set to 0.
Field | Type | Description |
---|---|---|
append | boolean | whether or not to add the media to the end of the playlist rather than the beginning |
ids | array of media objects or ids | media to add |
Deletes media from the given playlist. Returns the media objects in the playlist after the deletion.
Field | Type | Description |
---|---|---|
ids | array of media object ids | media to delete |
Changes the order of media in the given playlist. Returns the media objects in the playlist after the rearrangement.
Field | Type | Description |
---|---|---|
beforeID | integer | id of the media above which to place the media to be moved |
ids | array of media object ids | media to move |
Changes the artist and title of media in the given playlist.
Returns the updated partial media object with only the author
and title
present.
Note: This change does not apply to the same media if it is in other playlists. However, if deleted and re-added, plug.dj does seem to remember the new name given.
Field | Type | Description |
---|---|---|
author | string | new artist for the media |
id | integer | media's id |
title | string | new title for the media |