@@ -155,9 +155,12 @@ def playlists(self) -> List[Union["Playlist", "UserPlaylist"]]:
155
155
def playlist_folders (
156
156
self , offset : int = 0 , limit : int = 50 , parent_folder_id : str = "root"
157
157
) -> List ["Folder" ]:
158
- """Get the playlists created by the user.
158
+ """Get a list of folders created by the user.
159
159
160
- :return: Returns a list of :class:`~tidalapi.playlist.Playlist` objects containing the playlists.
160
+ :param offset: The amount of items you want returned.
161
+ :param limit: The index of the first item you want included.
162
+ :param parent_folder_id: Parent folder ID. Default: 'root' playlist folder
163
+ :return: Returns a list of :class:`~tidalapi.playlist.Folder` objects containing the Folders.
161
164
"""
162
165
params = {
163
166
"folderId" : parent_folder_id ,
@@ -184,6 +187,8 @@ def public_playlists(
184
187
) -> List [Union ["Playlist" , "UserPlaylist" ]]:
185
188
"""Get the (public) playlists created by the user.
186
189
190
+ :param offset: The amount of items you want returned.
191
+ :param limit: The index of the first item you want included.
187
192
:return: List of public playlists.
188
193
"""
189
194
params = {"limit" : limit , "offset" : offset }
@@ -204,7 +209,7 @@ def public_playlists(
204
209
)
205
210
206
211
def playlist_and_favorite_playlists (
207
- self , offset : int = 0 , limit : int = 50
212
+ self , limit : Optional [ int ] = None , offset : int = 0
208
213
) -> List [Union ["Playlist" , "UserPlaylist" ]]:
209
214
"""Get the playlists created by the user, and the playlists favorited by the
210
215
user. This function is limited to 50 by TIDAL, requiring pagination.
@@ -228,6 +233,13 @@ def playlist_and_favorite_playlists(
228
233
def create_playlist (
229
234
self , title : str , description : str , parent_id : str = "root"
230
235
) -> "UserPlaylist" :
236
+ """Create a playlist in the specified parent folder.
237
+
238
+ :param title: Playlist title
239
+ :param description: Playlist description
240
+ :param parent_id: Parent folder ID. Default: 'root' playlist folder
241
+ :return: Returns an object of :class:`~tidalapi.playlist.UserPlaylist` containing the newly created playlist
242
+ """
231
243
params = {"name" : title , "description" : description , "folderId" : parent_id }
232
244
endpoint = "my-collection/playlists/folders/create-playlist"
233
245
@@ -245,6 +257,12 @@ def create_playlist(
245
257
raise ObjectNotFound ("Playlist not found after creation" )
246
258
247
259
def create_folder (self , title : str , parent_id : str = "root" ) -> "Folder" :
260
+ """Create folder in the specified parent folder.
261
+
262
+ :param title: Folder title
263
+ :param parent_id: Folder parent ID. Default: 'root' playlist folder
264
+ :return: Returns an object of :class:`~tidalapi.playlist.Folder` containing the newly created object
265
+ """
248
266
params = {"name" : title , "folderId" : parent_id }
249
267
endpoint = "my-collection/playlists/folders/create-folder"
250
268
0 commit comments