audioPlaylistUpdateGet method

Future<Map<String, dynamic>> audioPlaylistUpdateGet(
  1. String playlistId
)
inherited

audioPlaylistUpdateGet -> /v1/audio/playlist/{playlist_id}/updates

Requests a chunked data update every time the specified audio playlist changes. This endpoint can be used to subscribe to changes to a particular playlist. The response is chunked, where each chunk is a simple string "change". This string will be sent whenever the audio playlist changes in regards to any of the data returned by GET /audio/playlist/{playlist_id}. The updated playlist data can be queried by recalling GET /audio/playlist/{playlist_id}.

Note that this endpoint will return nothing unless the chunked parameter is set to true.

PARAMETERS

playlistId : The ID of the playlist, either UUID, name, or index, in order of interpretation and search priority. A path can also be specified to identify playlists within folders. UUID and name matches are searched through the entire playlist tree. Because UUIDs are unique a path is not necessary. A name path is not necessary unless there are multiple playlists with the same name in different folders. A partial path of names can be used as well. Indices only index into the immediate children at each level of the tree so an index path is requred to access playlists within folders if only using indices. A mix of UUIDs, names, and indices can be used for the path if desired.

  • Example (by_uuid): 3C39C433-5C18-4F51-B357-55BB870227C4
  • Example (by_name): Playlist Name
  • Example (by_name_with_path): Folder1/Folder2/Playlist Name
  • Example (by_index): 3
  • Example (by_index_path): 2/0/1
  • Example (by_mixed_path): 3C39C433-5C18-4F51-B357-55BB870227C4/Folder Name/0

RESPONSE 200:

The request was processed successfully.

content-type: application/json

schema:

{
  "type": "string",
  "required": [],
  "enum": [
    "change"
  ]
}

Implementation

Future<Map<String, dynamic>> audioPlaylistUpdateGet(String playlistId) async {
  String url = '/v1/audio/playlist/$playlistId/updates';

  return await call('get', url, httpAccept: 'application/json');
}