User Management
UserManagement(api, subsonic)
Class that contains all the methods needed to interact with the user management endpoints in the Subsonic API.
Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
change_password(username, new_password)
Change the password of a user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
username |
str
|
The username of the user to change its password. |
required |
new_password |
str
|
The new password for the user. |
required |
Returns:
Type | Description |
---|---|
Subsonic
|
The Subsonic object where this method was called to allow method chaining. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
create_user(username, password, email, ldap_authenticated=None, admin_role=None, settings_role=None, stream_role=None, jukebox_role=None, download_role=None, upload_role=None, playlist_role=None, cover_art_role=None, comment_role=None, podcast_role=None, share_role=None, video_conversion_role=None, music_folder_id=None, max_bit_rate=None)
Create a new user in the server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
username |
str
|
The username of the user to create. |
required |
password |
str
|
The password of the user to create. |
required |
email |
str
|
The email of the user to create. |
required |
ldap_authenticated |
bool | None
|
If the user is authenticated in a LDAP server. |
None
|
admin_role |
bool | None
|
If the user should be an administrator. |
None
|
settings_role |
bool | None
|
If the user is allowed to change its personal settings and password. |
None
|
stream_role |
bool | None
|
If the user should be allowed to stream songs and videos. |
None
|
jukebox_role |
bool | None
|
If the user should be able to play songs in the jukebox. |
None
|
download_role |
bool | None
|
If the user should be able to download files from the server. |
None
|
upload_role |
bool | None
|
If the user should be allowed to upload files to the server. |
None
|
playlist_role |
bool | None
|
If the user should be able to create and delete playlists. |
None
|
cover_art_role |
bool | None
|
If the user should be allowed to change cover art and tags of songs. |
None
|
comment_role |
bool | None
|
If the user is allowed to create and edit comments and ratings. |
None
|
podcast_role |
bool | None
|
If the user should be allowed to administrate podcasts. |
None
|
share_role |
bool | None
|
If the user should be able to create share links. |
None
|
video_conversion_role |
bool | None
|
If the use should be allowed to start video conversion in the server. |
None
|
music_folder_id |
list[str] | None
|
A list of IDs where the used should have access to. If no one is specified all of them will be accessible. |
None
|
max_bit_rate |
int | None
|
The max bitrate that the user should be able to stream. |
None
|
Returns:
Type | Description |
---|---|
User
|
An object that holds all the info about the new created user. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
|
delete_user(username)
Delete a user from the server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
username |
str
|
The username of the user to delete. |
required |
Returns:
Type | Description |
---|---|
Subsonic
|
The Subsonic object where this method was called to allow method chaining. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
get_user(username)
Get all the info about a user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
username |
str
|
The username of the user to get its info. |
required |
Returns:
Type | Description |
---|---|
User
|
An object that holds all the info about the requested user. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
get_users()
Get all the users registered in the server.
Returns:
Type | Description |
---|---|
list[User]
|
A list that holds all the info about all the available users in the server. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
update_user(username, password=None, email=None, ldap_authenticated=None, admin_role=None, settings_role=None, stream_role=None, jukebox_role=None, download_role=None, upload_role=None, playlist_role=None, cover_art_role=None, comment_role=None, podcast_role=None, share_role=None, video_conversion_role=None, music_folder_id=None, max_bit_rate=None)
Update the info of a user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
username |
str
|
The username of the user to update. |
required |
password |
str | None
|
The password of the user to update. |
None
|
email |
str | None
|
The email of the user to update. |
None
|
ldap_authenticated |
bool | None
|
If the user is authenticated in a LDAP server. |
None
|
admin_role |
bool | None
|
If the user should be an administrator. |
None
|
settings_role |
bool | None
|
If the user is allowed to change its personal settings and password. |
None
|
stream_role |
bool | None
|
If the user should be allowed to stream songs and videos. |
None
|
jukebox_role |
bool | None
|
If the user should be able to play songs in the jukebox. |
None
|
download_role |
bool | None
|
If the user should be able to download files from the server. |
None
|
upload_role |
bool | None
|
If the user should be allowed to upload files to the server. |
None
|
playlist_role |
bool | None
|
If the user should be able to create and delete playlists. |
None
|
cover_art_role |
bool | None
|
If the user should be allowed to change cover art and tags of songs. |
None
|
comment_role |
bool | None
|
If the user is allowed to create and edit comments and ratings. |
None
|
podcast_role |
bool | None
|
If the user should be allowed to administrate podcasts. |
None
|
share_role |
bool | None
|
If the user should be able to create share links. |
None
|
video_conversion_role |
bool | None
|
If the use should be allowed to start video conversion in the server. |
None
|
music_folder_id |
list[str] | None
|
A list of IDs where the used should have access to. If no one is specified all of them will be accessible. |
None
|
max_bit_rate |
int | None
|
The max bitrate that the user should be able to stream. |
None
|
Returns:
Type | Description |
---|---|
User
|
An object that holds all the info about the update user. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
|