Skip to content

Commit c32d228

Browse files
committed
Specification updates
1 parent ec05353 commit c32d228

23 files changed

Lines changed: 254 additions & 23 deletions

.openapi-generator/FILES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ docs/WatchEpisodes.md
250250
docs/WatchEpisodesAllOfData.md
251251
docs/WatchEpisodesAllOfEpisodes.md
252252
docs/WatchPromos.md
253+
docs/WatchPromosAllOfData.md
253254
git_push.sh
254255
jikan_openapi/__init__.py
255256
jikan_openapi/api/__init__.py
@@ -504,6 +505,7 @@ jikan_openapi/models/watch_episodes.py
504505
jikan_openapi/models/watch_episodes_all_of_data.py
505506
jikan_openapi/models/watch_episodes_all_of_episodes.py
506507
jikan_openapi/models/watch_promos.py
508+
jikan_openapi/models/watch_promos_all_of_data.py
507509
jikan_openapi/py.typed
508510
jikan_openapi/rest.py
509511
pyproject.toml
@@ -758,4 +760,5 @@ test/test_watch_episodes.py
758760
test/test_watch_episodes_all_of_data.py
759761
test/test_watch_episodes_all_of_episodes.py
760762
test/test_watch_promos.py
763+
test/test_watch_promos_all_of_data.py
761764
tox.ini

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,7 @@ Class | Method | HTTP request | Description
519519
- [WatchEpisodesAllOfData](docs/WatchEpisodesAllOfData.md)
520520
- [WatchEpisodesAllOfEpisodes](docs/WatchEpisodesAllOfEpisodes.md)
521521
- [WatchPromos](docs/WatchPromos.md)
522+
- [WatchPromosAllOfData](docs/WatchPromosAllOfData.md)
522523

523524

524525
<a id="documentation-for-authorization"></a>

docs/AnimeEpisodesAllOfData.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Name | Type | Description | Notes
1010
**title** | **str** | Title | [optional]
1111
**title_japanese** | **str** | Title Japanese | [optional]
1212
**title_romanji** | **str** | title_romanji | [optional]
13-
**duration** | **int** | Episode duration in seconds | [optional]
1413
**aired** | **str** | Aired Date ISO8601 | [optional]
14+
**score** | **float** | Aggregated episode score (1.00 - 5.00) based on MyAnimeList user voting | [optional]
1515
**filler** | **bool** | Filler episode | [optional]
1616
**recap** | **bool** | Recap episode | [optional]
1717
**forum_url** | **str** | Episode discussion forum URL | [optional]

docs/PaginationPlusPagination.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**last_visible_page** | **int** | | [optional]
99
**has_next_page** | **bool** | | [optional]
10+
**current_page** | **int** | | [optional]
1011
**items** | [**PaginationPlusPaginationItems**](PaginationPlusPaginationItems.md) | | [optional]
1112

1213
## Example

docs/WatchPromos.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ Watch Promos
77
Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
99
**pagination** | [**PaginationPagination**](PaginationPagination.md) | | [optional]
10-
**title** | **str** | Promo Title | [optional]
11-
**data** | **List[object]** | | [optional]
10+
**data** | [**List[WatchPromosAllOfData]**](WatchPromosAllOfData.md) | | [optional]
1211

1312
## Example
1413

docs/WatchPromosAllOfData.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# WatchPromosAllOfData
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**title** | **str** | Promo Title | [optional]
9+
**entry** | [**AnimeMeta**](AnimeMeta.md) | | [optional]
10+
**trailer** | [**Trailer**](Trailer.md) | | [optional]
11+
12+
## Example
13+
14+
```python
15+
from jikan_openapi.models.watch_promos_all_of_data import WatchPromosAllOfData
16+
17+
# TODO update the JSON string below
18+
json = "{}"
19+
# create an instance of WatchPromosAllOfData from a JSON string
20+
watch_promos_all_of_data_instance = WatchPromosAllOfData.from_json(json)
21+
# print the JSON string representation of the object
22+
print(WatchPromosAllOfData.to_json())
23+
24+
# convert the object into a dict
25+
watch_promos_all_of_data_dict = watch_promos_all_of_data_instance.to_dict()
26+
# create an instance of WatchPromosAllOfData from a dict
27+
watch_promos_all_of_data_form_dict = watch_promos_all_of_data.from_dict(watch_promos_all_of_data_dict)
28+
```
29+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
30+
31+

jikan_openapi/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,3 +276,4 @@
276276
from jikan_openapi.models.watch_episodes_all_of_data import WatchEpisodesAllOfData
277277
from jikan_openapi.models.watch_episodes_all_of_episodes import WatchEpisodesAllOfEpisodes
278278
from jikan_openapi.models.watch_promos import WatchPromos
279+
from jikan_openapi.models.watch_promos_all_of_data import WatchPromosAllOfData

jikan_openapi/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,3 +244,4 @@
244244
from jikan_openapi.models.watch_episodes_all_of_data import WatchEpisodesAllOfData
245245
from jikan_openapi.models.watch_episodes_all_of_episodes import WatchEpisodesAllOfEpisodes
246246
from jikan_openapi.models.watch_promos import WatchPromos
247+
from jikan_openapi.models.watch_promos_all_of_data import WatchPromosAllOfData

jikan_openapi/models/anime_episodes_all_of_data.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
import json
1919

2020
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
21-
from typing import Any, ClassVar, Dict, List, Optional
21+
from typing import Any, ClassVar, Dict, List, Optional, Union
22+
from typing_extensions import Annotated
2223
from typing import Optional, Set
2324
from typing_extensions import Self
2425

@@ -31,12 +32,12 @@ class AnimeEpisodesAllOfData(BaseModel):
3132
title: Optional[StrictStr] = Field(default=None, description="Title")
3233
title_japanese: Optional[StrictStr] = Field(default=None, description="Title Japanese")
3334
title_romanji: Optional[StrictStr] = Field(default=None, description="title_romanji")
34-
duration: Optional[StrictInt] = Field(default=None, description="Episode duration in seconds")
3535
aired: Optional[StrictStr] = Field(default=None, description="Aired Date ISO8601")
36+
score: Optional[Union[Annotated[float, Field(le=5, strict=True, ge=1)], Annotated[int, Field(le=5, strict=True, ge=1)]]] = Field(default=None, description="Aggregated episode score (1.00 - 5.00) based on MyAnimeList user voting")
3637
filler: Optional[StrictBool] = Field(default=None, description="Filler episode")
3738
recap: Optional[StrictBool] = Field(default=None, description="Recap episode")
3839
forum_url: Optional[StrictStr] = Field(default=None, description="Episode discussion forum URL")
39-
__properties: ClassVar[List[str]] = ["mal_id", "url", "title", "title_japanese", "title_romanji", "duration", "aired", "filler", "recap", "forum_url"]
40+
__properties: ClassVar[List[str]] = ["mal_id", "url", "title", "title_japanese", "title_romanji", "aired", "score", "filler", "recap", "forum_url"]
4041

4142
model_config = ConfigDict(
4243
populate_by_name=True,
@@ -92,16 +93,16 @@ def to_dict(self) -> Dict[str, Any]:
9293
if self.title_romanji is None and "title_romanji" in self.model_fields_set:
9394
_dict['title_romanji'] = None
9495

95-
# set to None if duration (nullable) is None
96-
# and model_fields_set contains the field
97-
if self.duration is None and "duration" in self.model_fields_set:
98-
_dict['duration'] = None
99-
10096
# set to None if aired (nullable) is None
10197
# and model_fields_set contains the field
10298
if self.aired is None and "aired" in self.model_fields_set:
10399
_dict['aired'] = None
104100

101+
# set to None if score (nullable) is None
102+
# and model_fields_set contains the field
103+
if self.score is None and "score" in self.model_fields_set:
104+
_dict['score'] = None
105+
105106
# set to None if forum_url (nullable) is None
106107
# and model_fields_set contains the field
107108
if self.forum_url is None and "forum_url" in self.model_fields_set:
@@ -124,8 +125,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
124125
"title": obj.get("title"),
125126
"title_japanese": obj.get("title_japanese"),
126127
"title_romanji": obj.get("title_romanji"),
127-
"duration": obj.get("duration"),
128128
"aired": obj.get("aired"),
129+
"score": obj.get("score"),
129130
"filler": obj.get("filler"),
130131
"recap": obj.get("recap"),
131132
"forum_url": obj.get("forum_url")

jikan_openapi/models/pagination_plus_pagination.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ class PaginationPlusPagination(BaseModel):
2929
""" # noqa: E501
3030
last_visible_page: Optional[StrictInt] = None
3131
has_next_page: Optional[StrictBool] = None
32+
current_page: Optional[StrictInt] = None
3233
items: Optional[PaginationPlusPaginationItems] = None
33-
__properties: ClassVar[List[str]] = ["last_visible_page", "has_next_page", "items"]
34+
__properties: ClassVar[List[str]] = ["last_visible_page", "has_next_page", "current_page", "items"]
3435

3536
model_config = ConfigDict(
3637
populate_by_name=True,
@@ -88,6 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
8889
_obj = cls.model_validate({
8990
"last_visible_page": obj.get("last_visible_page"),
9091
"has_next_page": obj.get("has_next_page"),
92+
"current_page": obj.get("current_page"),
9193
"items": PaginationPlusPaginationItems.from_dict(obj["items"]) if obj.get("items") is not None else None
9294
})
9395
return _obj

0 commit comments

Comments
 (0)