Skip to content

Commit

Permalink
Merge pull request #38 from devopsarr/feature/code-generation
Browse files Browse the repository at this point in the history
chore(deps): update openapitools/openapi-generator-cli docker tag to v7.2.0
  • Loading branch information
devopsarr[bot] committed Jan 28, 2024
2 parents eaddef7 + b856d2f commit b9db269
Show file tree
Hide file tree
Showing 12 changed files with 87 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ docs/NotificationApi.md
docs/NotificationResource.md
docs/PingApi.md
docs/PingResource.md
docs/PrivacyLevel.md
docs/ProviderMessage.md
docs/ProviderMessageType.md
docs/ProxyType.md
Expand Down Expand Up @@ -194,6 +195,7 @@ prowlarr/models/movie_search_param.py
prowlarr/models/music_search_param.py
prowlarr/models/notification_resource.py
prowlarr/models/ping_resource.py
prowlarr/models/privacy_level.py
prowlarr/models/provider_message.py
prowlarr/models/provider_message_type.py
prowlarr/models/proxy_type.py
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ Class | Method | HTTP request | Description
- [MusicSearchParam](docs/MusicSearchParam.md)
- [NotificationResource](docs/NotificationResource.md)
- [PingResource](docs/PingResource.md)
- [PrivacyLevel](docs/PrivacyLevel.md)
- [ProviderMessage](docs/ProviderMessage.md)
- [ProviderMessageType](docs/ProviderMessageType.md)
- [ProxyType](docs/ProxyType.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/AppProfileResource.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Name | Type | Description | Notes
**id** | **int** | | [optional]
**name** | **str** | | [optional]
**enable_rss** | **bool** | | [optional]
**enable_interactive_search** | **bool** | | [optional]
**enable_automatic_search** | **bool** | | [optional]
**enable_interactive_search** | **bool** | | [optional]
**minimum_seeders** | **int** | | [optional]

## Example
Expand Down
1 change: 1 addition & 0 deletions docs/Field.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Name | Type | Description | Notes
**select_options_provider_action** | **str** | | [optional]
**section** | **str** | | [optional]
**hidden** | **str** | | [optional]
**privacy** | [**PrivacyLevel**](PrivacyLevel.md) | | [optional]
**placeholder** | **str** | | [optional]
**is_float** | **bool** | | [optional]

Expand Down
15 changes: 9 additions & 6 deletions docs/HistoryApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Method | HTTP request | Description


# **get_history**
> HistoryResourcePagingResource get_history(page=page, page_size=page_size, sort_key=sort_key, sort_direction=sort_direction, event_type=event_type, successful=successful, download_id=download_id)
> HistoryResourcePagingResource get_history(page=page, page_size=page_size, sort_key=sort_key, sort_direction=sort_direction, event_type=event_type, successful=successful, download_id=download_id, indexer_ids=indexer_ids)


Expand Down Expand Up @@ -55,12 +55,13 @@ with prowlarr.ApiClient(configuration) as api_client:
page_size = 10 # int | (optional) (default to 10)
sort_key = 'sort_key_example' # str | (optional)
sort_direction = prowlarr.SortDirection() # SortDirection | (optional)
event_type = 56 # int | (optional)
event_type = [56] # List[int] | (optional)
successful = True # bool | (optional)
download_id = 'download_id_example' # str | (optional)
indexer_ids = [56] # List[int] | (optional)

try:
api_response = api_instance.get_history(page=page, page_size=page_size, sort_key=sort_key, sort_direction=sort_direction, event_type=event_type, successful=successful, download_id=download_id)
api_response = api_instance.get_history(page=page, page_size=page_size, sort_key=sort_key, sort_direction=sort_direction, event_type=event_type, successful=successful, download_id=download_id, indexer_ids=indexer_ids)
print("The response of HistoryApi->get_history:\n")
pprint(api_response)
except Exception as e:
Expand Down Expand Up @@ -106,12 +107,13 @@ with prowlarr.ApiClient(configuration) as api_client:
page_size = 10 # int | (optional) (default to 10)
sort_key = 'sort_key_example' # str | (optional)
sort_direction = prowlarr.SortDirection() # SortDirection | (optional)
event_type = 56 # int | (optional)
event_type = [56] # List[int] | (optional)
successful = True # bool | (optional)
download_id = 'download_id_example' # str | (optional)
indexer_ids = [56] # List[int] | (optional)

try:
api_response = api_instance.get_history(page=page, page_size=page_size, sort_key=sort_key, sort_direction=sort_direction, event_type=event_type, successful=successful, download_id=download_id)
api_response = api_instance.get_history(page=page, page_size=page_size, sort_key=sort_key, sort_direction=sort_direction, event_type=event_type, successful=successful, download_id=download_id, indexer_ids=indexer_ids)
print("The response of HistoryApi->get_history:\n")
pprint(api_response)
except Exception as e:
Expand All @@ -126,9 +128,10 @@ Name | Type | Description | Notes
**page_size** | **int**| | [optional] [default to 10]
**sort_key** | **str**| | [optional]
**sort_direction** | [**SortDirection**](.md)| | [optional]
**event_type** | **int**| | [optional]
**event_type** | [**List[int]**](int.md)| | [optional]
**successful** | **bool**| | [optional]
**download_id** | **str**| | [optional]
**indexer_ids** | [**List[int]**](int.md)| | [optional]

### Return type

Expand Down
10 changes: 10 additions & 0 deletions docs/PrivacyLevel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# PrivacyLevel


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


1 change: 1 addition & 0 deletions prowlarr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
from prowlarr.models.music_search_param import MusicSearchParam
from prowlarr.models.notification_resource import NotificationResource
from prowlarr.models.ping_resource import PingResource
from prowlarr.models.privacy_level import PrivacyLevel
from prowlarr.models.provider_message import ProviderMessage
from prowlarr.models.provider_message_type import ProviderMessageType
from prowlarr.models.proxy_type import ProxyType
Expand Down
25 changes: 17 additions & 8 deletions prowlarr/api/history_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ def __init__(self, api_client=None):
self.api_client = api_client

@validate_arguments
def get_history(self, page : Optional[StrictInt] = None, page_size : Optional[StrictInt] = None, sort_key : Optional[StrictStr] = None, sort_direction : Optional[SortDirection] = None, event_type : Optional[StrictInt] = None, successful : Optional[StrictBool] = None, download_id : Optional[StrictStr] = None, **kwargs) -> HistoryResourcePagingResource: # noqa: E501
def get_history(self, page : Optional[StrictInt] = None, page_size : Optional[StrictInt] = None, sort_key : Optional[StrictStr] = None, sort_direction : Optional[SortDirection] = None, event_type : Optional[List[StrictInt]] = None, successful : Optional[StrictBool] = None, download_id : Optional[StrictStr] = None, indexer_ids : Optional[List[StrictInt]] = None, **kwargs) -> HistoryResourcePagingResource: # noqa: E501
"""get_history # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_history(page, page_size, sort_key, sort_direction, event_type, successful, download_id, async_req=True)
>>> thread = api.get_history(page, page_size, sort_key, sort_direction, event_type, successful, download_id, indexer_ids, async_req=True)
>>> result = thread.get()
:param page:
Expand All @@ -66,11 +66,13 @@ def get_history(self, page : Optional[StrictInt] = None, page_size : Optional[St
:param sort_direction:
:type sort_direction: SortDirection
:param event_type:
:type event_type: int
:type event_type: List[int]
:param successful:
:type successful: bool
:param download_id:
:type download_id: str
:param indexer_ids:
:type indexer_ids: List[int]
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
Expand All @@ -87,16 +89,16 @@ def get_history(self, page : Optional[StrictInt] = None, page_size : Optional[St
:rtype: HistoryResourcePagingResource
"""
kwargs['_return_http_data_only'] = True
return self.get_history_with_http_info(page, page_size, sort_key, sort_direction, event_type, successful, download_id, **kwargs) # noqa: E501
return self.get_history_with_http_info(page, page_size, sort_key, sort_direction, event_type, successful, download_id, indexer_ids, **kwargs) # noqa: E501

@validate_arguments
def get_history_with_http_info(self, page : Optional[StrictInt] = None, page_size : Optional[StrictInt] = None, sort_key : Optional[StrictStr] = None, sort_direction : Optional[SortDirection] = None, event_type : Optional[StrictInt] = None, successful : Optional[StrictBool] = None, download_id : Optional[StrictStr] = None, **kwargs): # noqa: E501
def get_history_with_http_info(self, page : Optional[StrictInt] = None, page_size : Optional[StrictInt] = None, sort_key : Optional[StrictStr] = None, sort_direction : Optional[SortDirection] = None, event_type : Optional[List[StrictInt]] = None, successful : Optional[StrictBool] = None, download_id : Optional[StrictStr] = None, indexer_ids : Optional[List[StrictInt]] = None, **kwargs): # noqa: E501
"""get_history # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_history_with_http_info(page, page_size, sort_key, sort_direction, event_type, successful, download_id, async_req=True)
>>> thread = api.get_history_with_http_info(page, page_size, sort_key, sort_direction, event_type, successful, download_id, indexer_ids, async_req=True)
>>> result = thread.get()
:param page:
Expand All @@ -108,11 +110,13 @@ def get_history_with_http_info(self, page : Optional[StrictInt] = None, page_siz
:param sort_direction:
:type sort_direction: SortDirection
:param event_type:
:type event_type: int
:type event_type: List[int]
:param successful:
:type successful: bool
:param download_id:
:type download_id: str
:param indexer_ids:
:type indexer_ids: List[int]
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
Expand Down Expand Up @@ -146,7 +150,8 @@ def get_history_with_http_info(self, page : Optional[StrictInt] = None, page_siz
'sort_direction',
'event_type',
'successful',
'download_id'
'download_id',
'indexer_ids'
]
_all_params.extend(
[
Expand Down Expand Up @@ -187,10 +192,14 @@ def get_history_with_http_info(self, page : Optional[StrictInt] = None, page_siz
_query_params.append(('sortDirection', _params['sort_direction']))
if _params.get('event_type') is not None: # noqa: E501
_query_params.append(('eventType', _params['event_type']))
_collection_formats['eventType'] = 'multi'
if _params.get('successful') is not None: # noqa: E501
_query_params.append(('successful', _params['successful']))
if _params.get('download_id') is not None: # noqa: E501
_query_params.append(('downloadId', _params['download_id']))
if _params.get('indexer_ids') is not None: # noqa: E501
_query_params.append(('indexerIds', _params['indexer_ids']))
_collection_formats['indexerIds'] = 'multi'

# process the header parameters
_header_params = dict(_params.get('_headers', {}))
Expand Down
1 change: 1 addition & 0 deletions prowlarr/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
from prowlarr.models.music_search_param import MusicSearchParam
from prowlarr.models.notification_resource import NotificationResource
from prowlarr.models.ping_resource import PingResource
from prowlarr.models.privacy_level import PrivacyLevel
from prowlarr.models.provider_message import ProviderMessage
from prowlarr.models.provider_message_type import ProviderMessageType
from prowlarr.models.proxy_type import ProxyType
Expand Down
6 changes: 3 additions & 3 deletions prowlarr/models/app_profile_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ class AppProfileResource(BaseModel):
id: Optional[int]
name: Optional[str]
enable_rss: Optional[bool]
enable_interactive_search: Optional[bool]
enable_automatic_search: Optional[bool]
enable_interactive_search: Optional[bool]
minimum_seeders: Optional[int]
__properties = ["id", "name", "enableRss", "enableInteractiveSearch", "enableAutomaticSearch", "minimumSeeders"]
__properties = ["id", "name", "enableRss", "enableAutomaticSearch", "enableInteractiveSearch", "minimumSeeders"]

class Config:
allow_population_by_field_name = True
Expand Down Expand Up @@ -80,8 +80,8 @@ def from_dict(cls, obj: dict) -> AppProfileResource:
"id": obj.get("id"),
"name": obj.get("name"),
"enable_rss": obj.get("enableRss"),
"enable_interactive_search": obj.get("enableInteractiveSearch"),
"enable_automatic_search": obj.get("enableAutomaticSearch"),
"enable_interactive_search": obj.get("enableInteractiveSearch"),
"minimum_seeders": obj.get("minimumSeeders")
})
return _obj
Expand Down
5 changes: 4 additions & 1 deletion prowlarr/models/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

from typing import Any, ClassVar, Dict, List, Optional
from pydantic import BaseModel
from prowlarr.models.privacy_level import PrivacyLevel
from prowlarr.models.select_option import SelectOption

class Field(BaseModel):
Expand All @@ -41,9 +42,10 @@ class Field(BaseModel):
select_options_provider_action: Optional[str]
section: Optional[str]
hidden: Optional[str]
privacy: Optional[PrivacyLevel]
placeholder: Optional[str]
is_float: Optional[bool]
__properties = ["order", "name", "label", "unit", "helpText", "helpTextWarning", "helpLink", "value", "type", "advanced", "selectOptions", "selectOptionsProviderAction", "section", "hidden", "placeholder", "isFloat"]
__properties = ["order", "name", "label", "unit", "helpText", "helpTextWarning", "helpLink", "value", "type", "advanced", "selectOptions", "selectOptionsProviderAction", "section", "hidden", "privacy", "placeholder", "isFloat"]

class Config:
allow_population_by_field_name = True
Expand Down Expand Up @@ -157,6 +159,7 @@ def from_dict(cls, obj: dict) -> Field:
"select_options_provider_action": obj.get("selectOptionsProviderAction"),
"section": obj.get("section"),
"hidden": obj.get("hidden"),
"privacy": obj.get("privacy"),
"placeholder": obj.get("placeholder"),
"is_float": obj.get("isFloat")
})
Expand Down
37 changes: 37 additions & 0 deletions prowlarr/models/privacy_level.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# coding: utf-8

"""
Prowlarr
Prowlarr API docs # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""


from inspect import getfullargspec
import pprint
import re # noqa: F401
from aenum import Enum, no_arg





class PrivacyLevel(str, Enum):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""

"""
allowed enum values
"""

NORMAL = 'normal'
PASSWORD = 'password'
APIKEY = 'apiKey'
USERNAME = 'userName'

0 comments on commit b9db269

Please sign in to comment.