Bookmarks
Bookmarks(api, subsonic)
Class that contains all the methods needed to interact with the bookmark endpoints in the Subsonic API.
Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
create_bookmark(song_or_video_id, position, comment=None)
Creates a new bookmark for the authenticated user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
song_or_video_id |
str
|
The ID of the song or video to bookmark. |
required |
position |
int
|
A position in milliseconds to be indicated with the song or video. |
required |
comment |
str | None
|
A comment to be attached with the song or video. |
None
|
Returns:
Type | Description |
---|---|
Bookmark
|
An object that contains all the info of the new created bookmark. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
delete_bookmark(song_or_video_id)
Deletes a bookmark for the authenticated user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
song_or_video_id |
str
|
The ID of the song or video to delete its bookmark. |
required |
Returns: The Subsonic object where this method was called to allow method chaining.
Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
get_bookmark(bookmark_id)
Get all the info of a bookmark given its ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
bookmark_id |
str
|
The id of the bookmark to get. |
required |
Returns:
Type | Description |
---|---|
Bookmark | None
|
A object that contains all the info of the requested bookmark. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
get_bookmarks()
Get all the bookmarks created by the authenticated user.
Returns:
Type | Description |
---|---|
list[Bookmark]
|
A list containing all the bookmarks for the authenticated user. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
get_play_queue()
Get the play queue of the authenticated user.
Returns:
Type | Description |
---|---|
PlayQueue
|
An object that contains all the info of the play queue of the user. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
save_play_queue(song_ids, current_song_id=None, position=None)
Saves a new play queue for the authenticated user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
song_ids |
list[str]
|
A list with all the songs to add to the queue. |
required |
current_song_id |
str | None
|
The ID of the current playing song. |
None
|
position |
int | None
|
A position in milliseconds of where the current song playback it at. |
None
|
Returns:
Type | Description |
---|---|
PlayQueue
|
An object that contains all the info of the new saved play queue. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
update_bookmark(song_or_video_id, position, comment=None)
Updates a bookmark for the authenticated user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
song_or_video_id |
str
|
The ID of the song or video to update its bookmark. |
required |
position |
int
|
A position in milliseconds to be indicated with the song or video. |
required |
comment |
str | None
|
A comment to be attached with the song or video. |
None
|
Returns: An object that contains all the info of the new created bookmark.