years_controller = client.years
YearsController
Gets a year.
def get_year(self,
year,
user_id=None)
Parameter | Type | Tags | Description |
---|---|---|---|
year |
int |
Template, Required | The year. |
user_id |
uuid|string |
Query, Optional | Optional. Filter by user id, and attach user data. |
year = 248
result = years_controller.get_year(year)
HTTP Status Code | Error Description | Exception Class |
---|---|---|
401 | Unauthorized | APIException |
403 | Forbidden | APIException |
404 | Year not found. | ProblemDetailsException |
Get years.
def get_years(self,
start_index=None,
limit=None,
sort_order=None,
parent_id=None,
fields=None,
exclude_item_types=None,
include_item_types=None,
media_types=None,
sort_by=None,
enable_user_data=None,
image_type_limit=None,
enable_image_types=None,
user_id=None,
recursive=True,
enable_images=True)
Parameter | Type | Tags | Description |
---|---|---|---|
start_index |
int |
Query, Optional | Skips over a given number of items within the results. Use for paging. |
limit |
int |
Query, Optional | Optional. The maximum number of records to return. |
sort_order |
List of SortOrderEnum |
Query, Optional | Sort Order - Ascending,Descending. |
parent_id |
uuid|string |
Query, Optional | Specify this to localize the search to a specific item or folder. Omit to use the root. |
fields |
List of ItemFieldsEnum |
Query, Optional | Optional. Specify additional fields of information to return in the output. |
exclude_item_types |
List of BaseItemKindEnum |
Query, Optional | Optional. If specified, results will be excluded based on item type. This allows multiple, comma delimited. |
include_item_types |
List of BaseItemKindEnum |
Query, Optional | Optional. If specified, results will be included based on item type. This allows multiple, comma delimited. |
media_types |
List of string |
Query, Optional | Optional. Filter by MediaType. Allows multiple, comma delimited. |
sort_by |
List of string |
Query, Optional | Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime. |
enable_user_data |
bool |
Query, Optional | Optional. Include user data. |
image_type_limit |
int |
Query, Optional | Optional. The max number of images to return, per image type. |
enable_image_types |
List of ImageTypeEnum |
Query, Optional | Optional. The image types to include in the output. |
user_id |
uuid|string |
Query, Optional | User Id. |
recursive |
bool |
Query, Optional | Search recursively. Default: True |
enable_images |
bool |
Query, Optional | Optional. Include image information in output. Default: True |
recursive = True
enable_images = True
result = years_controller.get_years(None, None, None, None, None, None, None, None, None, None, None, None, None, recursive, enable_images)
HTTP Status Code | Error Description | Exception Class |
---|---|---|
401 | Unauthorized | APIException |
403 | Forbidden | APIException |