About Playlists

About Playlists



The Python SDK allows you to access Personal Cloud Storage account holder’s data to retrieve, create, edit, modify, and delete playlists. Supported types of playlists include image, music, video, and image-video playlists. The following examples provide detailed steps that describe how to use supported methods and include code samples to help you get started with playlists.


Add an Item to a Playlist

playlist_adds = cloud.add_playlist_items(created_playlist.uid, ['/path/to/file'])

Create a Playlist

created_playlist = cloud.create_playlist('new playlist', 'image', ['/path/to/file','/path/to/file/2'])

Delete a Playlist


Delete an Item from a Playlist

# playlist_item retrieved from 'playlist_items' call
cloud.remove_playlist_item(created_playlist.uid, playlist_item.itemuid)

Retrieve Items from Playlist

# uid retrieved from playlists call
items = cloud.playlist_items(uid)

### Retrieve a List of Playlists

playlists = cloud.playlists()

Retrieve a Playlist

# uid retrieved from playlists call
playlist = cloud.playlist(uid)

Update Playlist’s Definition

updated_playlist_definition = cloud.update_playlist_definition(created_playlist.uid, 'playlist renamed', 'image', ['/path/to/file'])

Update a Playlist’s Metadata

updated_playlist = cloud.update_playlist(created_playlist.uid, 'playlist renamed', 'image')

Copyright © 2015-2017, Verizon and/or its Licensors. All rights reserved.