Bookmark
Bookmark(subsonic, entry, position, username=None, created=None, changed=None, comment=None)
Bases: Model
Object that holds all the info about a bookmark.
Attributes:
Name | Type | Description |
---|---|---|
song |
Song
|
All the info about the bookmarked song. |
position |
int
|
The position in seconds of the playback of the song when it was bookmarked. |
user |
User | None
|
All the info about the user that created the bookmark. |
comment |
str | None
|
A comment attached to the bookmark. |
created |
datetime | None
|
The timestamp when the bookmark was created. |
changed |
datetime | None
|
The timestamp when the bookmark was updated. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_bookmark.py
create()
Create a new bookmark for the authenticated user with the same data of the object where this method is called.
Returns:
Type | Description |
---|---|
Self
|
The object itself. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_bookmark.py
delete()
Delete the bookmark entry from the server.
Returns:
Type | Description |
---|---|
Self
|
The object itself. |
generate()
Return a new album object with all the data updated from the API, using the endpoint that return the most information possible.
Useful for making copies with updated data or updating the object
itself with immutability, e.g., foo = foo.generate()
.
Returns:
Type | Description |
---|---|
Bookmark
|
A new object with all the updated info. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_bookmark.py
update()
Update the info about the bookmark of this song using the current data of the object.
Returns:
Type | Description |
---|---|
Self
|
The object itself. |