playlistGet method

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

playlistGet -> /v1/playlist/{playlist_id}

Requests a list of the items in the specified playlist.

PARAMETERS

playlistId (required) : 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": "object",
  "required": [
    "id",
    "items"
  ],
  "example": {
    "id": {
      "index": 0,
      "name": "Sunday Service",
      "uuid": "942C3FC3-C4B2-44F7-A55D-4CC913BB8A5A"
    },
    "items": [
      {
        "id": {
          "index": 0,
          "name": "Songs",
          "uuid": ""
        },
        "type": "header",
        "is_hidden": true,
        "is_pco": false,
        "header_color": {
          "red": 0,
          "green": 0.54,
          "blue": 0.87,
          "alpha": 1
        }
      },
      {
        "id": {
          "index": 1,
          "name": "Amazing Grace",
          "uuid": "942C3FC3-C4B2-44F7-A55D-4CC913BB8A5B"
        },
        "type": "presentation",
        "is_hidden": false,
        "is_pco": false
      },
      {
        "id": {
          "index": 2,
          "name": "Graves Into Gardens",
          "uuid": "942C3FC3-C4B2-44F7-A55D-4CC913BB8A5C"
        },
        "type": "presentation",
        "is_hidden": false,
        "is_pco": false
      },
      {
        "id": {
          "index": 3,
          "name": "Sermon",
          "uuid": ""
        },
        "type": "header",
        "is_hidden": false,
        "is_pco": false,
        "header_color": {
          "red": 0.87,
          "green": 0,
          "blue": 0.54,
          "alpha": 1
        }
      },
      {
        "id": {
          "index": 4,
          "name": "Sermon Notes 2022-01-16",
          "uuid": "942C3FC3-C4B2-44F7-A55D-4CC913BB8A5D"
        },
        "type": "presentation",
        "is_hidden": false,
        "is_pco": false
      }
    ]
  }
}

Implementation

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

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