Skip to content

Latest commit

 

History

History
316 lines (210 loc) · 7.62 KB

library-structure.md

File metadata and controls

316 lines (210 loc) · 7.62 KB

Library Structure

library_structure_controller = client.library_structure

Class Name

LibraryStructureController

Methods

Add Media Path

Add a media path to a library.

def add_media_path(self,
                  body,
                  refresh_library=False)

Parameters

Parameter Type Tags Description
body MediaPathDto Body, Required The media path dto.
refresh_library bool Query, Optional Whether to refresh the library.
Default: False

Response Type

void

Example Usage

body = MediaPathDto()
body.name = 'Name6'
refresh_library = False

result = library_structure_controller.add_media_path(body, refresh_library)

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized APIException
403 Forbidden APIException

Add Virtual Folder

Adds a virtual folder.

def add_virtual_folder(self,
                      name=None,
                      collection_type=None,
                      paths=None,
                      refresh_library=False,
                      body=None)

Parameters

Parameter Type Tags Description
name string Query, Optional The name of the virtual folder.
collection_type CollectionTypeOptionsEnum Query, Optional The type of the collection.
paths List of string Query, Optional The paths of the virtual folder.
refresh_library bool Query, Optional Whether to refresh the library.
Default: False
body AddVirtualFolderDto Body, Optional The library options.

Response Type

void

Example Usage

refresh_library = False

result = library_structure_controller.add_virtual_folder(None, None, None, refresh_library)

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized APIException
403 Forbidden APIException

Get Virtual Folders

Gets all virtual folders.

def get_virtual_folders(self)

Response Type

List of VirtualFolderInfo

Example Usage

result = library_structure_controller.get_virtual_folders()

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized APIException
403 Forbidden APIException

Remove Media Path

Remove a media path.

def remove_media_path(self,
                     name=None,
                     path=None,
                     refresh_library=False)

Parameters

Parameter Type Tags Description
name string Query, Optional The name of the library.
path string Query, Optional The path to remove.
refresh_library bool Query, Optional Whether to refresh the library.
Default: False

Response Type

void

Example Usage

refresh_library = False

result = library_structure_controller.remove_media_path(None, None, refresh_library)

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized APIException
403 Forbidden APIException

Remove Virtual Folder

Removes a virtual folder.

def remove_virtual_folder(self,
                         name=None,
                         refresh_library=False)

Parameters

Parameter Type Tags Description
name string Query, Optional The name of the folder.
refresh_library bool Query, Optional Whether to refresh the library.
Default: False

Response Type

void

Example Usage

refresh_library = False

result = library_structure_controller.remove_virtual_folder(None, refresh_library)

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized APIException
403 Forbidden APIException

Rename Virtual Folder

Renames a virtual folder.

def rename_virtual_folder(self,
                         name=None,
                         new_name=None,
                         refresh_library=False)

Parameters

Parameter Type Tags Description
name string Query, Optional The name of the virtual folder.
new_name string Query, Optional The new name.
refresh_library bool Query, Optional Whether to refresh the library.
Default: False

Response Type

void

Example Usage

refresh_library = False

result = library_structure_controller.rename_virtual_folder(None, None, refresh_library)

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized APIException
403 Forbidden APIException
404 Library doesn't exist. ProblemDetailsException
409 Library already exists. ProblemDetailsException

Update Library Options

Update library options.

def update_library_options(self,
                          body=None)

Parameters

Parameter Type Tags Description
body UpdateLibraryOptionsDto Body, Optional The library name and options.

Response Type

void

Example Usage

result = library_structure_controller.update_library_options()

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized APIException
403 Forbidden APIException

Update Media Path

Updates a media path.

def update_media_path(self,
                     body)

Parameters

Parameter Type Tags Description
body UpdateMediaPathRequestDto Body, Required The name of the library and path infos.

Response Type

void

Example Usage

body = UpdateMediaPathRequestDto()
body.name = 'Name6'
body.path_info = MediaPathInfo()

result = library_structure_controller.update_media_path(body)

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized APIException
403 Forbidden APIException