Skip to content

Commit

Permalink
Merge pull request #14 from nwithan8/develop
Browse files Browse the repository at this point in the history
- Fix return type declarations
  • Loading branch information
nwithan8 authored Feb 1, 2022
2 parents 5e18f69 + b0a131e commit 4365318
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions tautulli/jsonapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ def get_history(self, grouping: bool = False, include_activity: bool = False, us

@raw_json
def get_home_stats(self, grouping: bool = False, time_range: int = 30, stats_type: str = 'plays', start: int = 0,
count: int = 5, stat_id: str = None) -> list[dict]:
count: int = 5, stat_id: str = None) -> List[dict]:
"""
Get the homepage watch statistics
Expand All @@ -836,7 +836,7 @@ def get_home_stats(self, grouping: bool = False, time_range: int = 30, stats_typ
:param stat_id: Name of a single statistic to return (i.e. 'top_movies', 'popular_tv', 'most_concurrent')
:type stat_id: str, optional
:return: List of data
:rtype: list[dict]
:rtype: List[dict]
"""
grouping = bool_to_int(boolean=grouping)
if _is_invalid_choice(value=stats_type, variable_name="stats_type",
Expand All @@ -851,12 +851,12 @@ def get_home_stats(self, grouping: bool = False, time_range: int = 30, stats_typ

@property
@raw_json
def libraries(self) -> list[dict]:
def libraries(self) -> List[dict]:
"""
Get a list of all libraries on your server
:return: Dict of data
:rtype: dict
:return: List of data
:rtype: List[dict]
"""
return 'get_libraries', None

Expand Down Expand Up @@ -1014,7 +1014,7 @@ def get_library_watch_time_stats(self, section_id: str, grouping: bool = False,

@raw_json
def get_logs(self, sort: str = None, search: str = None, order_direction: str = None, regex: str = None,
start: int = None, end: int = None) -> list[dict]:
start: int = None, end: int = None) -> List[dict]:
"""
Get the Tautulli logs
Expand All @@ -1031,7 +1031,7 @@ def get_logs(self, sort: str = None, search: str = None, order_direction: str =
:param end: Row number to end at
:type end: int, optional
:return: List of data
:rtype: list[dict]
:rtype: List[dict]
"""
if _is_invalid_choice(value=sort, variable_name='sort',
choices=static.log_sorting):
Expand Down Expand Up @@ -1124,12 +1124,12 @@ def get_newsletter_log(self, order_column: str = None, order_direction: str = No

@property
@raw_json
def newsletters(self) -> list[dict]:
def newsletters(self) -> List[dict]:
"""
Get a list of configured newsletters
:return: List of data
:rtype: list[dict]
:rtype: List[dict]
"""
return 'get_newsletters', None

Expand Down Expand Up @@ -1176,24 +1176,24 @@ def get_notifier_config(self, notifier_id: int) -> dict:

@property
@raw_json
def notifier_parameters(self) -> list[dict]:
def notifier_parameters(self) -> List[dict]:
"""
Get a list of available notification parameters
:return: List of data
:rtype: list[dict]
:rtype: List[dict]
"""
return 'get_notifier_parameters', None

@raw_json
def get_notifiers(self, notify_action: str = None) -> list[dict]:
def get_notifiers(self, notify_action: str = None) -> List[dict]:
"""
Get a list of configured notifiers
:param notify_action: The notification action to filter out
:type notify_action: str, optional
:return: List of data
:rtype: list[dict]
:rtype: List[dict]
"""
params = build_optional_params(notify_action=notify_action)
return 'get_notifiers', params
Expand Down Expand Up @@ -1544,12 +1544,12 @@ def server_info(self) -> dict:

@property
@raw_json
def server_list(self) -> list[dict]:
def server_list(self) -> List[dict]:
"""
Get all your servers that are published to Plex.tv
:return: List of data
:rtype: list[dict]
:rtype: List[dict]
"""
return 'get_server_list', None

Expand All @@ -1569,12 +1569,12 @@ def get_server_pref(self, pref: str) -> str:

@property
@raw_json
def servers_info(self) -> list[dict]:
def servers_info(self) -> List[dict]:
"""
Get info about the Plex Media Server
:return: List of data
:rtype: list[dict]
:rtype: List[dict]
"""
return 'get_servers_info', None

Expand Down Expand Up @@ -1743,12 +1743,12 @@ def get_user_logins(self, user_id: str, order_column: str = None, order_directio

@property
@raw_json
def user_names(self) -> list[dict]:
def user_names(self) -> List[dict]:
"""
Get a list of all usernames and user ids
:return: List of data
:rtype: list[dict]
:rtype: List[dict]
"""
return 'get_user_names', None

Expand Down Expand Up @@ -1792,12 +1792,12 @@ def get_user_watch_time_stats(self, user_id: str, grouping: bool = False, query_

@property
@raw_json
def users(self) -> list[dict]:
def users(self) -> List[dict]:
"""
Get a list of all users that have access to your server
:return: List of data
:rtype: list[dict]
:rtype: List[dict]
"""
return 'get_users', None

Expand Down

0 comments on commit 4365318

Please sign in to comment.