nadeshiko-sdk 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nadeshiko/__init__.py +10 -0
- nadeshiko/_version.py +1 -0
- nadeshiko/api/__init__.py +1 -0
- nadeshiko/api/auth/__init__.py +3 -0
- nadeshiko/api/auth/internal/__init__.py +11 -0
- nadeshiko/api/auth/internal/get_discord_auth_url.py +176 -0
- nadeshiko/api/auth/internal/login.py +213 -0
- nadeshiko/api/auth/internal/login_discord.py +204 -0
- nadeshiko/api/auth/internal/login_google.py +204 -0
- nadeshiko/api/auth/internal/register.py +212 -0
- nadeshiko/api/auth_jwt/__init__.py +3 -0
- nadeshiko/api/auth_jwt/internal/__init__.py +7 -0
- nadeshiko/api/auth_jwt/internal/logout.py +151 -0
- nadeshiko/api/lists/__init__.py +8 -0
- nadeshiko/api/lists/internal/__init__.py +12 -0
- nadeshiko/api/lists/internal/list_add_item.py +215 -0
- nadeshiko/api/lists/internal/list_create.py +194 -0
- nadeshiko/api/lists/internal/list_destroy.py +193 -0
- nadeshiko/api/lists/internal/list_remove_item.py +207 -0
- nadeshiko/api/lists/internal/list_update.py +215 -0
- nadeshiko/api/lists/internal/list_update_item.py +229 -0
- nadeshiko/api/lists/list_index.py +257 -0
- nadeshiko/api/lists/list_show.py +193 -0
- nadeshiko/api/media/__init__.py +14 -0
- nadeshiko/api/media/character_show.py +193 -0
- nadeshiko/api/media/episode_index.py +229 -0
- nadeshiko/api/media/episode_show.py +207 -0
- nadeshiko/api/media/internal/__init__.py +16 -0
- nadeshiko/api/media/internal/episode_create.py +215 -0
- nadeshiko/api/media/internal/episode_destroy.py +205 -0
- nadeshiko/api/media/internal/episode_update.py +229 -0
- nadeshiko/api/media/internal/media_create.py +194 -0
- nadeshiko/api/media/internal/media_destroy.py +197 -0
- nadeshiko/api/media/internal/media_update.py +219 -0
- nadeshiko/api/media/internal/segment_create.py +229 -0
- nadeshiko/api/media/internal/segment_destroy.py +219 -0
- nadeshiko/api/media/internal/segment_index.py +243 -0
- nadeshiko/api/media/internal/segment_update.py +243 -0
- nadeshiko/api/media/media_index.py +232 -0
- nadeshiko/api/media/media_show.py +193 -0
- nadeshiko/api/media/segment_show.py +221 -0
- nadeshiko/api/media/segment_show_by_uuid.py +193 -0
- nadeshiko/api/media/seiyuu_show.py +193 -0
- nadeshiko/api/search/__init__.py +11 -0
- nadeshiko/api/search/fetch_media_info.py +278 -0
- nadeshiko/api/search/fetch_sentence_context.py +219 -0
- nadeshiko/api/search/internal/__init__.py +6 -0
- nadeshiko/api/search/search.py +295 -0
- nadeshiko/api/search/search_health_check.py +168 -0
- nadeshiko/api/search/search_multiple.py +238 -0
- nadeshiko/api/user/__init__.py +3 -0
- nadeshiko/api/user/internal/__init__.py +11 -0
- nadeshiko/api/user/internal/create_api_key.py +199 -0
- nadeshiko/api/user/internal/deactivate_api_key.py +194 -0
- nadeshiko/api/user/internal/get_api_keys.py +151 -0
- nadeshiko/api/user/internal/get_identity_me.py +156 -0
- nadeshiko/api/user/internal/get_user_info.py +156 -0
- nadeshiko/client.py +138 -0
- nadeshiko/errors.py +16 -0
- nadeshiko/models/__init__.py +215 -0
- nadeshiko/models/api_key.py +118 -0
- nadeshiko/models/api_key_permission.py +70 -0
- nadeshiko/models/auth_user.py +107 -0
- nadeshiko/models/basic_info.py +132 -0
- nadeshiko/models/category_statistic.py +71 -0
- nadeshiko/models/character.py +100 -0
- nadeshiko/models/character_input.py +130 -0
- nadeshiko/models/character_input_character_role.py +10 -0
- nadeshiko/models/character_with_media.py +124 -0
- nadeshiko/models/character_with_media_media_appearances_item.py +93 -0
- nadeshiko/models/character_with_media_media_appearances_item_role.py +10 -0
- nadeshiko/models/create_api_key_request.py +75 -0
- nadeshiko/models/create_api_key_response.py +70 -0
- nadeshiko/models/deactivate_api_key_request.py +62 -0
- nadeshiko/models/deactivate_api_key_response.py +62 -0
- nadeshiko/models/discord_auth_url_response.py +62 -0
- nadeshiko/models/discord_login_request.py +62 -0
- nadeshiko/models/episode.py +253 -0
- nadeshiko/models/episode_create_request.py +145 -0
- nadeshiko/models/episode_list_response.py +94 -0
- nadeshiko/models/episode_update_request.py +135 -0
- nadeshiko/models/error.py +128 -0
- nadeshiko/models/error_errors.py +46 -0
- nadeshiko/models/fetch_media_info_response.py +115 -0
- nadeshiko/models/fetch_media_info_type.py +10 -0
- nadeshiko/models/fetch_sentence_context_request.py +96 -0
- nadeshiko/models/fetch_sentence_context_response.py +75 -0
- nadeshiko/models/get_api_keys_response.py +86 -0
- nadeshiko/models/google_login_request.py +62 -0
- nadeshiko/models/list_.py +97 -0
- nadeshiko/models/list_add_item_body.py +69 -0
- nadeshiko/models/list_add_item_response_201.py +61 -0
- nadeshiko/models/list_create_request.py +107 -0
- nadeshiko/models/list_create_request_type.py +9 -0
- nadeshiko/models/list_create_request_visibility.py +9 -0
- nadeshiko/models/list_destroy_response_200.py +70 -0
- nadeshiko/models/list_index_type.py +9 -0
- nadeshiko/models/list_index_visibility.py +9 -0
- nadeshiko/models/list_input.py +138 -0
- nadeshiko/models/list_input_list_type.py +9 -0
- nadeshiko/models/list_input_list_visibility.py +9 -0
- nadeshiko/models/list_remove_item_response_200.py +61 -0
- nadeshiko/models/list_type.py +9 -0
- nadeshiko/models/list_update_body.py +78 -0
- nadeshiko/models/list_update_body_visibility.py +9 -0
- nadeshiko/models/list_update_item_body.py +61 -0
- nadeshiko/models/list_update_item_response_200.py +61 -0
- nadeshiko/models/list_visibility.py +9 -0
- nadeshiko/models/list_with_media.py +119 -0
- nadeshiko/models/list_with_media_media_item.py +83 -0
- nadeshiko/models/list_with_media_type.py +9 -0
- nadeshiko/models/list_with_media_visibility.py +9 -0
- nadeshiko/models/login_request.py +70 -0
- nadeshiko/models/login_response.py +84 -0
- nadeshiko/models/logout_response.py +73 -0
- nadeshiko/models/media.py +288 -0
- nadeshiko/models/media_category.py +11 -0
- nadeshiko/models/media_character.py +78 -0
- nadeshiko/models/media_character_role.py +10 -0
- nadeshiko/models/media_create_request.py +270 -0
- nadeshiko/models/media_create_request_category.py +11 -0
- nadeshiko/models/media_destroy_response_200.py +70 -0
- nadeshiko/models/media_index_category.py +9 -0
- nadeshiko/models/media_info_data.py +307 -0
- nadeshiko/models/media_info_path.py +83 -0
- nadeshiko/models/media_info_stats.py +89 -0
- nadeshiko/models/media_list_response.py +94 -0
- nadeshiko/models/media_update_request.py +297 -0
- nadeshiko/models/media_update_request_category.py +9 -0
- nadeshiko/models/quota_info.py +87 -0
- nadeshiko/models/quota_info_quota_limit_type_1.py +8 -0
- nadeshiko/models/register_request.py +78 -0
- nadeshiko/models/register_response.py +76 -0
- nadeshiko/models/register_response_user.py +46 -0
- nadeshiko/models/search_health_check_response.py +138 -0
- nadeshiko/models/search_multiple_request.py +72 -0
- nadeshiko/models/search_multiple_response.py +79 -0
- nadeshiko/models/search_request.py +253 -0
- nadeshiko/models/search_request_content_sort.py +13 -0
- nadeshiko/models/search_request_media_item.py +85 -0
- nadeshiko/models/search_request_media_item_seasons_item.py +69 -0
- nadeshiko/models/search_response.py +158 -0
- nadeshiko/models/segment.py +303 -0
- nadeshiko/models/segment_create_request.py +203 -0
- nadeshiko/models/segment_create_request_status.py +13 -0
- nadeshiko/models/segment_info.py +207 -0
- nadeshiko/models/segment_list_response.py +94 -0
- nadeshiko/models/segment_status.py +13 -0
- nadeshiko/models/segment_update_request.py +198 -0
- nadeshiko/models/segment_update_request_status.py +13 -0
- nadeshiko/models/seiyuu.py +86 -0
- nadeshiko/models/seiyuu_with_roles.py +108 -0
- nadeshiko/models/seiyuu_with_roles_roles_item.py +109 -0
- nadeshiko/models/seiyuu_with_roles_roles_item_role.py +10 -0
- nadeshiko/models/sentence.py +88 -0
- nadeshiko/models/statistic.py +132 -0
- nadeshiko/models/statistic_season_with_episode_hits.py +74 -0
- nadeshiko/models/statistic_season_with_episode_hits_additional_property.py +46 -0
- nadeshiko/models/user_info_response.py +79 -0
- nadeshiko/models/user_info_response_user.py +91 -0
- nadeshiko/models/user_role.py +71 -0
- nadeshiko/models/word_match.py +107 -0
- nadeshiko/models/word_match_media.py +98 -0
- nadeshiko/types.py +54 -0
- nadeshiko_sdk-0.1.0.dist-info/METADATA +147 -0
- nadeshiko_sdk-0.1.0.dist-info/RECORD +167 -0
- nadeshiko_sdk-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
from uuid import UUID
|
|
6
|
+
|
|
7
|
+
from attrs import define as _attrs_define
|
|
8
|
+
from attrs import field as _attrs_field
|
|
9
|
+
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="SegmentInfo")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class SegmentInfo:
|
|
17
|
+
"""Detailed information about a subtitle segment
|
|
18
|
+
|
|
19
|
+
Attributes:
|
|
20
|
+
status (int): Segment status (0=Deleted, 1=Active, 2=Suspended, 3=Verified, 100=Invalid Sentence, 101=Sentence
|
|
21
|
+
Too Long) Example: 1.
|
|
22
|
+
uuid (UUID): Unique identifier for the segment Example: 3fd94cef-a3e1-31ae-bc8d-e743f03e9c7e.
|
|
23
|
+
position (int): Position of the segment within the episode Example: 1133.
|
|
24
|
+
start_time (str): Timestamp in H:MM:SS.ffffff format (variable-length hours, microseconds) indicating when the
|
|
25
|
+
segment starts Example: 0:33:27.255000.
|
|
26
|
+
end_time (str): Timestamp in H:MM:SS.ffffff format (variable-length hours, microseconds) indicating when the
|
|
27
|
+
segment ends Example: 0:33:28.464000.
|
|
28
|
+
content_jp (str): Original Japanese content of the segment Example: 僕は僕で、君は君だ。.
|
|
29
|
+
content_en_mt (bool): Indicates whether the English translation was machine-translated
|
|
30
|
+
content_es_mt (bool): Indicates whether the Spanish translation was machine-translated
|
|
31
|
+
is_nsfw (bool): Indicates whether the segment contains NSFW (Not Safe For Work) content
|
|
32
|
+
content_jp_highlight (str | Unset): Japanese content with search terms highlighted Example:
|
|
33
|
+
<em>僕</em>は<em>僕</em>で、<em>君</em>は<em>君</em>だ。.
|
|
34
|
+
content_en (str | Unset): English translation of the segment content Example: I am me, and you are you..
|
|
35
|
+
content_en_highlight (str | Unset): English content with search terms highlighted Example: <em>I</em> am
|
|
36
|
+
<em>me</em>, and <em>you</em> are <em>you</em>..
|
|
37
|
+
content_es (str | Unset): Spanish translation of the segment content Example: Yo soy yo, y tú eres tú..
|
|
38
|
+
content_es_highlight (str | Unset): Spanish content with search terms highlighted Example: <em>Yo</em> soy
|
|
39
|
+
<em>yo</em>, y <em>tú</em> eres <em>tú</em>..
|
|
40
|
+
actor_ja (str | Unset): Name of the Japanese voice actor for this segment Example: Mamoru Miyano.
|
|
41
|
+
actor_en (str | Unset): Name of the English voice actor for this segment Example: J. Michael Tatum.
|
|
42
|
+
actor_es (str | Unset): Name of the Spanish voice actor for this segment Example: Alejandro Levis.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
status: int
|
|
46
|
+
uuid: UUID
|
|
47
|
+
position: int
|
|
48
|
+
start_time: str
|
|
49
|
+
end_time: str
|
|
50
|
+
content_jp: str
|
|
51
|
+
content_en_mt: bool
|
|
52
|
+
content_es_mt: bool
|
|
53
|
+
is_nsfw: bool
|
|
54
|
+
content_jp_highlight: str | Unset = UNSET
|
|
55
|
+
content_en: str | Unset = UNSET
|
|
56
|
+
content_en_highlight: str | Unset = UNSET
|
|
57
|
+
content_es: str | Unset = UNSET
|
|
58
|
+
content_es_highlight: str | Unset = UNSET
|
|
59
|
+
actor_ja: str | Unset = UNSET
|
|
60
|
+
actor_en: str | Unset = UNSET
|
|
61
|
+
actor_es: str | Unset = UNSET
|
|
62
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
63
|
+
|
|
64
|
+
def to_dict(self) -> dict[str, Any]:
|
|
65
|
+
status = self.status
|
|
66
|
+
|
|
67
|
+
uuid = str(self.uuid)
|
|
68
|
+
|
|
69
|
+
position = self.position
|
|
70
|
+
|
|
71
|
+
start_time = self.start_time
|
|
72
|
+
|
|
73
|
+
end_time = self.end_time
|
|
74
|
+
|
|
75
|
+
content_jp = self.content_jp
|
|
76
|
+
|
|
77
|
+
content_en_mt = self.content_en_mt
|
|
78
|
+
|
|
79
|
+
content_es_mt = self.content_es_mt
|
|
80
|
+
|
|
81
|
+
is_nsfw = self.is_nsfw
|
|
82
|
+
|
|
83
|
+
content_jp_highlight = self.content_jp_highlight
|
|
84
|
+
|
|
85
|
+
content_en = self.content_en
|
|
86
|
+
|
|
87
|
+
content_en_highlight = self.content_en_highlight
|
|
88
|
+
|
|
89
|
+
content_es = self.content_es
|
|
90
|
+
|
|
91
|
+
content_es_highlight = self.content_es_highlight
|
|
92
|
+
|
|
93
|
+
actor_ja = self.actor_ja
|
|
94
|
+
|
|
95
|
+
actor_en = self.actor_en
|
|
96
|
+
|
|
97
|
+
actor_es = self.actor_es
|
|
98
|
+
|
|
99
|
+
field_dict: dict[str, Any] = {}
|
|
100
|
+
field_dict.update(self.additional_properties)
|
|
101
|
+
field_dict.update(
|
|
102
|
+
{
|
|
103
|
+
"status": status,
|
|
104
|
+
"uuid": uuid,
|
|
105
|
+
"position": position,
|
|
106
|
+
"start_time": start_time,
|
|
107
|
+
"end_time": end_time,
|
|
108
|
+
"content_jp": content_jp,
|
|
109
|
+
"content_en_mt": content_en_mt,
|
|
110
|
+
"content_es_mt": content_es_mt,
|
|
111
|
+
"is_nsfw": is_nsfw,
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
if content_jp_highlight is not UNSET:
|
|
115
|
+
field_dict["content_jp_highlight"] = content_jp_highlight
|
|
116
|
+
if content_en is not UNSET:
|
|
117
|
+
field_dict["content_en"] = content_en
|
|
118
|
+
if content_en_highlight is not UNSET:
|
|
119
|
+
field_dict["content_en_highlight"] = content_en_highlight
|
|
120
|
+
if content_es is not UNSET:
|
|
121
|
+
field_dict["content_es"] = content_es
|
|
122
|
+
if content_es_highlight is not UNSET:
|
|
123
|
+
field_dict["content_es_highlight"] = content_es_highlight
|
|
124
|
+
if actor_ja is not UNSET:
|
|
125
|
+
field_dict["actor_ja"] = actor_ja
|
|
126
|
+
if actor_en is not UNSET:
|
|
127
|
+
field_dict["actor_en"] = actor_en
|
|
128
|
+
if actor_es is not UNSET:
|
|
129
|
+
field_dict["actor_es"] = actor_es
|
|
130
|
+
|
|
131
|
+
return field_dict
|
|
132
|
+
|
|
133
|
+
@classmethod
|
|
134
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
135
|
+
d = dict(src_dict)
|
|
136
|
+
status = d.pop("status")
|
|
137
|
+
|
|
138
|
+
uuid = UUID(d.pop("uuid"))
|
|
139
|
+
|
|
140
|
+
position = d.pop("position")
|
|
141
|
+
|
|
142
|
+
start_time = d.pop("start_time")
|
|
143
|
+
|
|
144
|
+
end_time = d.pop("end_time")
|
|
145
|
+
|
|
146
|
+
content_jp = d.pop("content_jp")
|
|
147
|
+
|
|
148
|
+
content_en_mt = d.pop("content_en_mt")
|
|
149
|
+
|
|
150
|
+
content_es_mt = d.pop("content_es_mt")
|
|
151
|
+
|
|
152
|
+
is_nsfw = d.pop("is_nsfw")
|
|
153
|
+
|
|
154
|
+
content_jp_highlight = d.pop("content_jp_highlight", UNSET)
|
|
155
|
+
|
|
156
|
+
content_en = d.pop("content_en", UNSET)
|
|
157
|
+
|
|
158
|
+
content_en_highlight = d.pop("content_en_highlight", UNSET)
|
|
159
|
+
|
|
160
|
+
content_es = d.pop("content_es", UNSET)
|
|
161
|
+
|
|
162
|
+
content_es_highlight = d.pop("content_es_highlight", UNSET)
|
|
163
|
+
|
|
164
|
+
actor_ja = d.pop("actor_ja", UNSET)
|
|
165
|
+
|
|
166
|
+
actor_en = d.pop("actor_en", UNSET)
|
|
167
|
+
|
|
168
|
+
actor_es = d.pop("actor_es", UNSET)
|
|
169
|
+
|
|
170
|
+
segment_info = cls(
|
|
171
|
+
status=status,
|
|
172
|
+
uuid=uuid,
|
|
173
|
+
position=position,
|
|
174
|
+
start_time=start_time,
|
|
175
|
+
end_time=end_time,
|
|
176
|
+
content_jp=content_jp,
|
|
177
|
+
content_en_mt=content_en_mt,
|
|
178
|
+
content_es_mt=content_es_mt,
|
|
179
|
+
is_nsfw=is_nsfw,
|
|
180
|
+
content_jp_highlight=content_jp_highlight,
|
|
181
|
+
content_en=content_en,
|
|
182
|
+
content_en_highlight=content_en_highlight,
|
|
183
|
+
content_es=content_es,
|
|
184
|
+
content_es_highlight=content_es_highlight,
|
|
185
|
+
actor_ja=actor_ja,
|
|
186
|
+
actor_en=actor_en,
|
|
187
|
+
actor_es=actor_es,
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
segment_info.additional_properties = d
|
|
191
|
+
return segment_info
|
|
192
|
+
|
|
193
|
+
@property
|
|
194
|
+
def additional_keys(self) -> list[str]:
|
|
195
|
+
return list(self.additional_properties.keys())
|
|
196
|
+
|
|
197
|
+
def __getitem__(self, key: str) -> Any:
|
|
198
|
+
return self.additional_properties[key]
|
|
199
|
+
|
|
200
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
201
|
+
self.additional_properties[key] = value
|
|
202
|
+
|
|
203
|
+
def __delitem__(self, key: str) -> None:
|
|
204
|
+
del self.additional_properties[key]
|
|
205
|
+
|
|
206
|
+
def __contains__(self, key: str) -> bool:
|
|
207
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from ..models.segment import Segment
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="SegmentListResponse")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class SegmentListResponse:
|
|
20
|
+
"""
|
|
21
|
+
Attributes:
|
|
22
|
+
data (list[Segment]): Array of segment objects
|
|
23
|
+
has_more_results (bool): Whether more results are available Example: True.
|
|
24
|
+
cursor (int | Unset): Cursor for pagination (last segment ID in current page) Example: 12345.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
data: list[Segment]
|
|
28
|
+
has_more_results: bool
|
|
29
|
+
cursor: int | Unset = UNSET
|
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
|
33
|
+
data = []
|
|
34
|
+
for data_item_data in self.data:
|
|
35
|
+
data_item = data_item_data.to_dict()
|
|
36
|
+
data.append(data_item)
|
|
37
|
+
|
|
38
|
+
has_more_results = self.has_more_results
|
|
39
|
+
|
|
40
|
+
cursor = self.cursor
|
|
41
|
+
|
|
42
|
+
field_dict: dict[str, Any] = {}
|
|
43
|
+
field_dict.update(self.additional_properties)
|
|
44
|
+
field_dict.update(
|
|
45
|
+
{
|
|
46
|
+
"data": data,
|
|
47
|
+
"hasMoreResults": has_more_results,
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
if cursor is not UNSET:
|
|
51
|
+
field_dict["cursor"] = cursor
|
|
52
|
+
|
|
53
|
+
return field_dict
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
57
|
+
from ..models.segment import Segment
|
|
58
|
+
|
|
59
|
+
d = dict(src_dict)
|
|
60
|
+
data = []
|
|
61
|
+
_data = d.pop("data")
|
|
62
|
+
for data_item_data in _data:
|
|
63
|
+
data_item = Segment.from_dict(data_item_data)
|
|
64
|
+
|
|
65
|
+
data.append(data_item)
|
|
66
|
+
|
|
67
|
+
has_more_results = d.pop("hasMoreResults")
|
|
68
|
+
|
|
69
|
+
cursor = d.pop("cursor", UNSET)
|
|
70
|
+
|
|
71
|
+
segment_list_response = cls(
|
|
72
|
+
data=data,
|
|
73
|
+
has_more_results=has_more_results,
|
|
74
|
+
cursor=cursor,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
segment_list_response.additional_properties = d
|
|
78
|
+
return segment_list_response
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
def additional_keys(self) -> list[str]:
|
|
82
|
+
return list(self.additional_properties.keys())
|
|
83
|
+
|
|
84
|
+
def __getitem__(self, key: str) -> Any:
|
|
85
|
+
return self.additional_properties[key]
|
|
86
|
+
|
|
87
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
88
|
+
self.additional_properties[key] = value
|
|
89
|
+
|
|
90
|
+
def __delitem__(self, key: str) -> None:
|
|
91
|
+
del self.additional_properties[key]
|
|
92
|
+
|
|
93
|
+
def __contains__(self, key: str) -> bool:
|
|
94
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..models.segment_update_request_status import SegmentUpdateRequestStatus
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="SegmentUpdateRequest")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class SegmentUpdateRequest:
|
|
17
|
+
"""All fields are optional for partial updates
|
|
18
|
+
|
|
19
|
+
Attributes:
|
|
20
|
+
position (int | Unset): Position of the segment within the episode Example: 1133.
|
|
21
|
+
status (SegmentUpdateRequestStatus | Unset): Segment status Example: 1.
|
|
22
|
+
start_time (str | Unset): Timestamp in H:MM:SS.ffffff format indicating when the segment starts Example:
|
|
23
|
+
0:33:27.255000.
|
|
24
|
+
end_time (str | Unset): Timestamp in H:MM:SS.ffffff format indicating when the segment ends Example:
|
|
25
|
+
0:33:28.464000.
|
|
26
|
+
content (str | Unset): Original Japanese content of the segment Example: 僕は僕で、君は君だ。.
|
|
27
|
+
content_spanish (str | Unset): Spanish translation of the segment content Example: Yo soy yo, y tú eres tú..
|
|
28
|
+
content_spanish_mt (bool | Unset): Whether the Spanish translation was machine-translated
|
|
29
|
+
content_english (str | Unset): English translation of the segment content Example: I am me, and you are you..
|
|
30
|
+
content_english_mt (bool | Unset): Whether the English translation was machine-translated
|
|
31
|
+
is_nsfw (bool | Unset): Whether the segment contains NSFW content
|
|
32
|
+
image_url (str | Unset): URL to segment screenshot/image Example: https://example.com/images/segment.jpg.
|
|
33
|
+
audio_url (str | Unset): URL to segment audio file Example: https://example.com/audio/segment.mp3.
|
|
34
|
+
actor_ja (str | Unset): Japanese voice actor name Example: Mamoru Miyano.
|
|
35
|
+
actor_es (str | Unset): Spanish voice actor name Example: Alejandro Levis.
|
|
36
|
+
actor_en (str | Unset): English voice actor name Example: J. Michael Tatum.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
position: int | Unset = UNSET
|
|
40
|
+
status: SegmentUpdateRequestStatus | Unset = UNSET
|
|
41
|
+
start_time: str | Unset = UNSET
|
|
42
|
+
end_time: str | Unset = UNSET
|
|
43
|
+
content: str | Unset = UNSET
|
|
44
|
+
content_spanish: str | Unset = UNSET
|
|
45
|
+
content_spanish_mt: bool | Unset = UNSET
|
|
46
|
+
content_english: str | Unset = UNSET
|
|
47
|
+
content_english_mt: bool | Unset = UNSET
|
|
48
|
+
is_nsfw: bool | Unset = UNSET
|
|
49
|
+
image_url: str | Unset = UNSET
|
|
50
|
+
audio_url: str | Unset = UNSET
|
|
51
|
+
actor_ja: str | Unset = UNSET
|
|
52
|
+
actor_es: str | Unset = UNSET
|
|
53
|
+
actor_en: str | Unset = UNSET
|
|
54
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> dict[str, Any]:
|
|
57
|
+
position = self.position
|
|
58
|
+
|
|
59
|
+
status: int | Unset = UNSET
|
|
60
|
+
if not isinstance(self.status, Unset):
|
|
61
|
+
status = self.status.value
|
|
62
|
+
|
|
63
|
+
start_time = self.start_time
|
|
64
|
+
|
|
65
|
+
end_time = self.end_time
|
|
66
|
+
|
|
67
|
+
content = self.content
|
|
68
|
+
|
|
69
|
+
content_spanish = self.content_spanish
|
|
70
|
+
|
|
71
|
+
content_spanish_mt = self.content_spanish_mt
|
|
72
|
+
|
|
73
|
+
content_english = self.content_english
|
|
74
|
+
|
|
75
|
+
content_english_mt = self.content_english_mt
|
|
76
|
+
|
|
77
|
+
is_nsfw = self.is_nsfw
|
|
78
|
+
|
|
79
|
+
image_url = self.image_url
|
|
80
|
+
|
|
81
|
+
audio_url = self.audio_url
|
|
82
|
+
|
|
83
|
+
actor_ja = self.actor_ja
|
|
84
|
+
|
|
85
|
+
actor_es = self.actor_es
|
|
86
|
+
|
|
87
|
+
actor_en = self.actor_en
|
|
88
|
+
|
|
89
|
+
field_dict: dict[str, Any] = {}
|
|
90
|
+
field_dict.update(self.additional_properties)
|
|
91
|
+
field_dict.update({})
|
|
92
|
+
if position is not UNSET:
|
|
93
|
+
field_dict["position"] = position
|
|
94
|
+
if status is not UNSET:
|
|
95
|
+
field_dict["status"] = status
|
|
96
|
+
if start_time is not UNSET:
|
|
97
|
+
field_dict["startTime"] = start_time
|
|
98
|
+
if end_time is not UNSET:
|
|
99
|
+
field_dict["endTime"] = end_time
|
|
100
|
+
if content is not UNSET:
|
|
101
|
+
field_dict["content"] = content
|
|
102
|
+
if content_spanish is not UNSET:
|
|
103
|
+
field_dict["contentSpanish"] = content_spanish
|
|
104
|
+
if content_spanish_mt is not UNSET:
|
|
105
|
+
field_dict["contentSpanishMt"] = content_spanish_mt
|
|
106
|
+
if content_english is not UNSET:
|
|
107
|
+
field_dict["contentEnglish"] = content_english
|
|
108
|
+
if content_english_mt is not UNSET:
|
|
109
|
+
field_dict["contentEnglishMt"] = content_english_mt
|
|
110
|
+
if is_nsfw is not UNSET:
|
|
111
|
+
field_dict["isNsfw"] = is_nsfw
|
|
112
|
+
if image_url is not UNSET:
|
|
113
|
+
field_dict["imageUrl"] = image_url
|
|
114
|
+
if audio_url is not UNSET:
|
|
115
|
+
field_dict["audioUrl"] = audio_url
|
|
116
|
+
if actor_ja is not UNSET:
|
|
117
|
+
field_dict["actorJa"] = actor_ja
|
|
118
|
+
if actor_es is not UNSET:
|
|
119
|
+
field_dict["actorEs"] = actor_es
|
|
120
|
+
if actor_en is not UNSET:
|
|
121
|
+
field_dict["actorEn"] = actor_en
|
|
122
|
+
|
|
123
|
+
return field_dict
|
|
124
|
+
|
|
125
|
+
@classmethod
|
|
126
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
127
|
+
d = dict(src_dict)
|
|
128
|
+
position = d.pop("position", UNSET)
|
|
129
|
+
|
|
130
|
+
_status = d.pop("status", UNSET)
|
|
131
|
+
status: SegmentUpdateRequestStatus | Unset
|
|
132
|
+
if isinstance(_status, Unset):
|
|
133
|
+
status = UNSET
|
|
134
|
+
else:
|
|
135
|
+
status = SegmentUpdateRequestStatus(_status)
|
|
136
|
+
|
|
137
|
+
start_time = d.pop("startTime", UNSET)
|
|
138
|
+
|
|
139
|
+
end_time = d.pop("endTime", UNSET)
|
|
140
|
+
|
|
141
|
+
content = d.pop("content", UNSET)
|
|
142
|
+
|
|
143
|
+
content_spanish = d.pop("contentSpanish", UNSET)
|
|
144
|
+
|
|
145
|
+
content_spanish_mt = d.pop("contentSpanishMt", UNSET)
|
|
146
|
+
|
|
147
|
+
content_english = d.pop("contentEnglish", UNSET)
|
|
148
|
+
|
|
149
|
+
content_english_mt = d.pop("contentEnglishMt", UNSET)
|
|
150
|
+
|
|
151
|
+
is_nsfw = d.pop("isNsfw", UNSET)
|
|
152
|
+
|
|
153
|
+
image_url = d.pop("imageUrl", UNSET)
|
|
154
|
+
|
|
155
|
+
audio_url = d.pop("audioUrl", UNSET)
|
|
156
|
+
|
|
157
|
+
actor_ja = d.pop("actorJa", UNSET)
|
|
158
|
+
|
|
159
|
+
actor_es = d.pop("actorEs", UNSET)
|
|
160
|
+
|
|
161
|
+
actor_en = d.pop("actorEn", UNSET)
|
|
162
|
+
|
|
163
|
+
segment_update_request = cls(
|
|
164
|
+
position=position,
|
|
165
|
+
status=status,
|
|
166
|
+
start_time=start_time,
|
|
167
|
+
end_time=end_time,
|
|
168
|
+
content=content,
|
|
169
|
+
content_spanish=content_spanish,
|
|
170
|
+
content_spanish_mt=content_spanish_mt,
|
|
171
|
+
content_english=content_english,
|
|
172
|
+
content_english_mt=content_english_mt,
|
|
173
|
+
is_nsfw=is_nsfw,
|
|
174
|
+
image_url=image_url,
|
|
175
|
+
audio_url=audio_url,
|
|
176
|
+
actor_ja=actor_ja,
|
|
177
|
+
actor_es=actor_es,
|
|
178
|
+
actor_en=actor_en,
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
segment_update_request.additional_properties = d
|
|
182
|
+
return segment_update_request
|
|
183
|
+
|
|
184
|
+
@property
|
|
185
|
+
def additional_keys(self) -> list[str]:
|
|
186
|
+
return list(self.additional_properties.keys())
|
|
187
|
+
|
|
188
|
+
def __getitem__(self, key: str) -> Any:
|
|
189
|
+
return self.additional_properties[key]
|
|
190
|
+
|
|
191
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
192
|
+
self.additional_properties[key] = value
|
|
193
|
+
|
|
194
|
+
def __delitem__(self, key: str) -> None:
|
|
195
|
+
del self.additional_properties[key]
|
|
196
|
+
|
|
197
|
+
def __contains__(self, key: str) -> bool:
|
|
198
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="Seiyuu")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class Seiyuu:
|
|
14
|
+
"""Japanese voice actor (seiyuu)
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
id (int): AniList staff ID Example: 95991.
|
|
18
|
+
name_japanese (str): Japanese name of the voice actor Example: 阿部敦.
|
|
19
|
+
name_english (str): English name of the voice actor Example: Atsushi Abe.
|
|
20
|
+
image_url (str): Profile image URL Example: https://s4.anilist.co/file/anilistcdn/staff/large/n95991.jpg.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
id: int
|
|
24
|
+
name_japanese: str
|
|
25
|
+
name_english: str
|
|
26
|
+
image_url: str
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
id = self.id
|
|
31
|
+
|
|
32
|
+
name_japanese = self.name_japanese
|
|
33
|
+
|
|
34
|
+
name_english = self.name_english
|
|
35
|
+
|
|
36
|
+
image_url = self.image_url
|
|
37
|
+
|
|
38
|
+
field_dict: dict[str, Any] = {}
|
|
39
|
+
field_dict.update(self.additional_properties)
|
|
40
|
+
field_dict.update(
|
|
41
|
+
{
|
|
42
|
+
"id": id,
|
|
43
|
+
"nameJapanese": name_japanese,
|
|
44
|
+
"nameEnglish": name_english,
|
|
45
|
+
"imageUrl": image_url,
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
return field_dict
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
53
|
+
d = dict(src_dict)
|
|
54
|
+
id = d.pop("id")
|
|
55
|
+
|
|
56
|
+
name_japanese = d.pop("nameJapanese")
|
|
57
|
+
|
|
58
|
+
name_english = d.pop("nameEnglish")
|
|
59
|
+
|
|
60
|
+
image_url = d.pop("imageUrl")
|
|
61
|
+
|
|
62
|
+
seiyuu = cls(
|
|
63
|
+
id=id,
|
|
64
|
+
name_japanese=name_japanese,
|
|
65
|
+
name_english=name_english,
|
|
66
|
+
image_url=image_url,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
seiyuu.additional_properties = d
|
|
70
|
+
return seiyuu
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def additional_keys(self) -> list[str]:
|
|
74
|
+
return list(self.additional_properties.keys())
|
|
75
|
+
|
|
76
|
+
def __getitem__(self, key: str) -> Any:
|
|
77
|
+
return self.additional_properties[key]
|
|
78
|
+
|
|
79
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
80
|
+
self.additional_properties[key] = value
|
|
81
|
+
|
|
82
|
+
def __delitem__(self, key: str) -> None:
|
|
83
|
+
del self.additional_properties[key]
|
|
84
|
+
|
|
85
|
+
def __contains__(self, key: str) -> bool:
|
|
86
|
+
return key in self.additional_properties
|