gazu 1.0.2__py2.py3-none-any.whl → 1.1.0__py2.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.
- gazu/__version__.py +1 -1
- gazu/asset.py +157 -51
- gazu/cache.py +25 -17
- gazu/casting.py +178 -25
- gazu/client.py +124 -71
- gazu/concept.py +35 -17
- gazu/context.py +41 -15
- gazu/edit.py +36 -17
- gazu/encoder.py +3 -1
- gazu/entity.py +47 -18
- gazu/events.py +27 -22
- gazu/files.py +616 -220
- gazu/helpers.py +13 -5
- gazu/person.py +194 -86
- gazu/playlist.py +107 -53
- gazu/project.py +207 -92
- gazu/py.typed +0 -0
- gazu/scene.py +57 -17
- gazu/search.py +10 -3
- gazu/shot.py +195 -76
- gazu/sorting.py +4 -1
- gazu/sync.py +167 -97
- gazu/task.py +544 -186
- gazu/user.py +127 -63
- {gazu-1.0.2.dist-info → gazu-1.1.0.dist-info}/METADATA +2 -1
- gazu-1.1.0.dist-info/RECORD +31 -0
- gazu-1.0.2.dist-info/RECORD +0 -30
- {gazu-1.0.2.dist-info → gazu-1.1.0.dist-info}/WHEEL +0 -0
- {gazu-1.0.2.dist-info → gazu-1.1.0.dist-info}/licenses/LICENSE +0 -0
- {gazu-1.0.2.dist-info → gazu-1.1.0.dist-info}/top_level.txt +0 -0
gazu/user.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing_extensions import Literal
|
|
4
|
+
|
|
1
5
|
import datetime
|
|
2
6
|
from gazu.exception import NotAuthenticatedException
|
|
3
7
|
|
|
4
8
|
from . import client as raw
|
|
9
|
+
from .client import KitsuClient
|
|
5
10
|
from .sorting import sort_by_name
|
|
6
11
|
from .helpers import normalize_model_parameter
|
|
7
12
|
|
|
@@ -11,7 +16,7 @@ default = raw.default_client
|
|
|
11
16
|
|
|
12
17
|
|
|
13
18
|
@cache
|
|
14
|
-
def all_open_projects(client=default):
|
|
19
|
+
def all_open_projects(client: KitsuClient = default) -> list[dict]:
|
|
15
20
|
"""
|
|
16
21
|
Returns:
|
|
17
22
|
list: Projects for which the user is part of the team. Admins see all
|
|
@@ -22,7 +27,9 @@ def all_open_projects(client=default):
|
|
|
22
27
|
|
|
23
28
|
|
|
24
29
|
@cache
|
|
25
|
-
def all_asset_types_for_project(
|
|
30
|
+
def all_asset_types_for_project(
|
|
31
|
+
project: str | dict, client: KitsuClient = default
|
|
32
|
+
) -> list[dict]:
|
|
26
33
|
"""
|
|
27
34
|
Args:
|
|
28
35
|
project (str / dict): The project dict or the project ID.
|
|
@@ -38,7 +45,9 @@ def all_asset_types_for_project(project, client=default):
|
|
|
38
45
|
|
|
39
46
|
|
|
40
47
|
@cache
|
|
41
|
-
def all_assets_for_asset_type_and_project(
|
|
48
|
+
def all_assets_for_asset_type_and_project(
|
|
49
|
+
project: str | dict, asset_type: str | dict, client: KitsuClient = default
|
|
50
|
+
) -> list[dict]:
|
|
42
51
|
"""
|
|
43
52
|
Args:
|
|
44
53
|
project (str / dict): The project dict or the project ID.
|
|
@@ -59,7 +68,9 @@ def all_assets_for_asset_type_and_project(project, asset_type, client=default):
|
|
|
59
68
|
|
|
60
69
|
|
|
61
70
|
@cache
|
|
62
|
-
def all_tasks_for_asset(
|
|
71
|
+
def all_tasks_for_asset(
|
|
72
|
+
asset: str | dict, client: KitsuClient = default
|
|
73
|
+
) -> list[dict]:
|
|
63
74
|
"""
|
|
64
75
|
Args:
|
|
65
76
|
asset (str / dict): The asset dict or the asset ID.
|
|
@@ -74,7 +85,9 @@ def all_tasks_for_asset(asset, client=default):
|
|
|
74
85
|
|
|
75
86
|
|
|
76
87
|
@cache
|
|
77
|
-
def all_tasks_for_shot(
|
|
88
|
+
def all_tasks_for_shot(
|
|
89
|
+
shot: str | dict, client: KitsuClient = default
|
|
90
|
+
) -> list[dict]:
|
|
78
91
|
"""
|
|
79
92
|
Args:
|
|
80
93
|
shot (str / dict): The shot dict or the shot ID.
|
|
@@ -89,7 +102,9 @@ def all_tasks_for_shot(shot, client=default):
|
|
|
89
102
|
|
|
90
103
|
|
|
91
104
|
@cache
|
|
92
|
-
def all_tasks_for_scene(
|
|
105
|
+
def all_tasks_for_scene(
|
|
106
|
+
scene: str | dict, client: KitsuClient = default
|
|
107
|
+
) -> list[dict]:
|
|
93
108
|
"""
|
|
94
109
|
Args:
|
|
95
110
|
scene (str / dict): The scene dict or the scene ID.
|
|
@@ -104,7 +119,9 @@ def all_tasks_for_scene(scene, client=default):
|
|
|
104
119
|
|
|
105
120
|
|
|
106
121
|
@cache
|
|
107
|
-
def all_tasks_for_sequence(
|
|
122
|
+
def all_tasks_for_sequence(
|
|
123
|
+
sequence: str | dict, client: KitsuClient = default
|
|
124
|
+
) -> list[dict]:
|
|
108
125
|
"""
|
|
109
126
|
Return the list of tasks for given asset and current user.
|
|
110
127
|
"""
|
|
@@ -115,7 +132,9 @@ def all_tasks_for_sequence(sequence, client=default):
|
|
|
115
132
|
|
|
116
133
|
|
|
117
134
|
@cache
|
|
118
|
-
def all_task_types_for_asset(
|
|
135
|
+
def all_task_types_for_asset(
|
|
136
|
+
asset: str | dict, client: KitsuClient = default
|
|
137
|
+
) -> list[dict]:
|
|
119
138
|
"""
|
|
120
139
|
Args:
|
|
121
140
|
asset (str / dict): The asset dict or the asset ID.
|
|
@@ -130,7 +149,9 @@ def all_task_types_for_asset(asset, client=default):
|
|
|
130
149
|
|
|
131
150
|
|
|
132
151
|
@cache
|
|
133
|
-
def all_task_types_for_shot(
|
|
152
|
+
def all_task_types_for_shot(
|
|
153
|
+
shot: str | dict, client: KitsuClient = default
|
|
154
|
+
) -> list[dict]:
|
|
134
155
|
"""
|
|
135
156
|
Args:
|
|
136
157
|
shot (str / dict): The shot dict or the shot ID.
|
|
@@ -145,7 +166,9 @@ def all_task_types_for_shot(shot, client=default):
|
|
|
145
166
|
|
|
146
167
|
|
|
147
168
|
@cache
|
|
148
|
-
def all_task_types_for_scene(
|
|
169
|
+
def all_task_types_for_scene(
|
|
170
|
+
scene: str | dict, client: KitsuClient = default
|
|
171
|
+
) -> list[dict]:
|
|
149
172
|
"""
|
|
150
173
|
Args:
|
|
151
174
|
scene (str / dict): The scene dict or the scene ID.
|
|
@@ -160,7 +183,9 @@ def all_task_types_for_scene(scene, client=default):
|
|
|
160
183
|
|
|
161
184
|
|
|
162
185
|
@cache
|
|
163
|
-
def all_task_types_for_sequence(
|
|
186
|
+
def all_task_types_for_sequence(
|
|
187
|
+
sequence: str | dict, client: KitsuClient = default
|
|
188
|
+
) -> list[dict]:
|
|
164
189
|
"""
|
|
165
190
|
Returns:
|
|
166
191
|
list: Task types for given asset and current user.
|
|
@@ -172,7 +197,9 @@ def all_task_types_for_sequence(sequence, client=default):
|
|
|
172
197
|
|
|
173
198
|
|
|
174
199
|
@cache
|
|
175
|
-
def all_sequences_for_project(
|
|
200
|
+
def all_sequences_for_project(
|
|
201
|
+
project: str | dict, client: KitsuClient = default
|
|
202
|
+
) -> list[dict]:
|
|
176
203
|
"""
|
|
177
204
|
Args:
|
|
178
205
|
project (str / dict): The project dict or the project ID.
|
|
@@ -187,7 +214,9 @@ def all_sequences_for_project(project, client=default):
|
|
|
187
214
|
|
|
188
215
|
|
|
189
216
|
@cache
|
|
190
|
-
def all_episodes_for_project(
|
|
217
|
+
def all_episodes_for_project(
|
|
218
|
+
project: str | dict, client: KitsuClient = default
|
|
219
|
+
) -> list[dict]:
|
|
191
220
|
"""
|
|
192
221
|
Args:
|
|
193
222
|
project (str / dict): The project dict or the project ID.
|
|
@@ -201,7 +230,9 @@ def all_episodes_for_project(project, client=default):
|
|
|
201
230
|
|
|
202
231
|
|
|
203
232
|
@cache
|
|
204
|
-
def all_shots_for_sequence(
|
|
233
|
+
def all_shots_for_sequence(
|
|
234
|
+
sequence: str | dict, client: KitsuClient = default
|
|
235
|
+
) -> list[dict]:
|
|
205
236
|
"""
|
|
206
237
|
Args:
|
|
207
238
|
sequence (str / dict): The sequence dict or the sequence ID.
|
|
@@ -216,7 +247,9 @@ def all_shots_for_sequence(sequence, client=default):
|
|
|
216
247
|
|
|
217
248
|
|
|
218
249
|
@cache
|
|
219
|
-
def all_scenes_for_sequence(
|
|
250
|
+
def all_scenes_for_sequence(
|
|
251
|
+
sequence: str | dict, client: KitsuClient = default
|
|
252
|
+
) -> list[dict]:
|
|
220
253
|
"""
|
|
221
254
|
Args:
|
|
222
255
|
sequence (str / dict): The sequence dict or the sequence ID.
|
|
@@ -231,7 +264,7 @@ def all_scenes_for_sequence(sequence, client=default):
|
|
|
231
264
|
|
|
232
265
|
|
|
233
266
|
@cache
|
|
234
|
-
def all_tasks_to_do(client=default):
|
|
267
|
+
def all_tasks_to_do(client: KitsuClient = default) -> list[dict]:
|
|
235
268
|
"""
|
|
236
269
|
Returns:
|
|
237
270
|
list: Tasks assigned to current user which are not complete.
|
|
@@ -240,7 +273,7 @@ def all_tasks_to_do(client=default):
|
|
|
240
273
|
|
|
241
274
|
|
|
242
275
|
@cache
|
|
243
|
-
def all_done_tasks(client=default):
|
|
276
|
+
def all_done_tasks(client: KitsuClient = default) -> list[dict]:
|
|
244
277
|
"""
|
|
245
278
|
Returns:
|
|
246
279
|
list: Tasks assigned to current user which are done.
|
|
@@ -249,7 +282,9 @@ def all_done_tasks(client=default):
|
|
|
249
282
|
|
|
250
283
|
|
|
251
284
|
@cache
|
|
252
|
-
def get_timespents_range(
|
|
285
|
+
def get_timespents_range(
|
|
286
|
+
start_date: str, end_date: str, client: KitsuClient = default
|
|
287
|
+
) -> list[dict]:
|
|
253
288
|
"""
|
|
254
289
|
Gets the timespents of the current user for the given date range.
|
|
255
290
|
|
|
@@ -258,6 +293,7 @@ def get_timespents_range(start_date, end_date, client=default):
|
|
|
258
293
|
the following format: YYYY-MM-DD
|
|
259
294
|
end_date (str): The last day of the date range as a date string with
|
|
260
295
|
the following format: YYYY-MM-DD
|
|
296
|
+
|
|
261
297
|
Returns:
|
|
262
298
|
list: All of the person's time spents
|
|
263
299
|
"""
|
|
@@ -268,7 +304,7 @@ def get_timespents_range(start_date, end_date, client=default):
|
|
|
268
304
|
return raw.get("/data/user/time-spents", params=date_range, client=client)
|
|
269
305
|
|
|
270
306
|
|
|
271
|
-
def log_desktop_session_log_in(client=default):
|
|
307
|
+
def log_desktop_session_log_in(client: KitsuClient = default) -> dict:
|
|
272
308
|
"""
|
|
273
309
|
Add a log entry to mention that the user logged in his computer.
|
|
274
310
|
|
|
@@ -280,7 +316,7 @@ def log_desktop_session_log_in(client=default):
|
|
|
280
316
|
return raw.post(path, data, client=client)
|
|
281
317
|
|
|
282
318
|
|
|
283
|
-
def is_authenticated(client=default):
|
|
319
|
+
def is_authenticated(client: KitsuClient = default) -> bool:
|
|
284
320
|
"""
|
|
285
321
|
Returns:
|
|
286
322
|
bool: Current user authenticated or not
|
|
@@ -291,7 +327,7 @@ def is_authenticated(client=default):
|
|
|
291
327
|
return False
|
|
292
328
|
|
|
293
329
|
|
|
294
|
-
def all_filters(client=default):
|
|
330
|
+
def all_filters(client: KitsuClient = default) -> list[dict]:
|
|
295
331
|
"""
|
|
296
332
|
Return:
|
|
297
333
|
list: all filters for current user.
|
|
@@ -300,8 +336,13 @@ def all_filters(client=default):
|
|
|
300
336
|
|
|
301
337
|
|
|
302
338
|
def new_filter(
|
|
303
|
-
name
|
|
304
|
-
|
|
339
|
+
name: str,
|
|
340
|
+
query: str,
|
|
341
|
+
list_type: str,
|
|
342
|
+
project: str | dict | None = None,
|
|
343
|
+
entity_type: str | None = None,
|
|
344
|
+
client: KitsuClient = default,
|
|
345
|
+
) -> dict:
|
|
305
346
|
"""
|
|
306
347
|
Create a new filter for current user.
|
|
307
348
|
|
|
@@ -332,17 +373,18 @@ def new_filter(
|
|
|
332
373
|
)
|
|
333
374
|
|
|
334
375
|
|
|
335
|
-
def remove_filter(filter, client=default):
|
|
376
|
+
def remove_filter(filter: str | dict, client: KitsuClient = default) -> str:
|
|
336
377
|
"""
|
|
337
378
|
Remove given filter from database.
|
|
338
379
|
|
|
339
380
|
Args:
|
|
340
381
|
filter (str / dict): The filter dict or the filter ID.
|
|
341
382
|
"""
|
|
383
|
+
filter = normalize_model_parameter(filter)
|
|
342
384
|
return raw.delete("data/user/filters/%s" % filter["id"], client=client)
|
|
343
385
|
|
|
344
386
|
|
|
345
|
-
def update_filter(filter, client=default):
|
|
387
|
+
def update_filter(filter: dict, client: KitsuClient = default) -> dict:
|
|
346
388
|
"""
|
|
347
389
|
Save given filter data into the API.
|
|
348
390
|
|
|
@@ -355,7 +397,7 @@ def update_filter(filter, client=default):
|
|
|
355
397
|
|
|
356
398
|
|
|
357
399
|
@cache
|
|
358
|
-
def get_context(client=default):
|
|
400
|
+
def get_context(client: KitsuClient = default) -> dict:
|
|
359
401
|
"""
|
|
360
402
|
Get user context.
|
|
361
403
|
|
|
@@ -366,12 +408,14 @@ def get_context(client=default):
|
|
|
366
408
|
|
|
367
409
|
|
|
368
410
|
@cache
|
|
369
|
-
def all_project_assets(
|
|
411
|
+
def all_project_assets(
|
|
412
|
+
project: str | dict, client: KitsuClient = default
|
|
413
|
+
) -> list[dict]:
|
|
370
414
|
"""
|
|
371
415
|
Get assets for which user has tasks assigned for given project.
|
|
372
416
|
|
|
373
417
|
Args:
|
|
374
|
-
project (
|
|
418
|
+
project (str / dict): The project dict or id.
|
|
375
419
|
|
|
376
420
|
Returns:
|
|
377
421
|
list: Assets for the project.
|
|
@@ -382,7 +426,7 @@ def all_project_assets(project, client=default):
|
|
|
382
426
|
|
|
383
427
|
|
|
384
428
|
@cache
|
|
385
|
-
def all_tasks_requiring_feedback(client=default):
|
|
429
|
+
def all_tasks_requiring_feedback(client: KitsuClient = default) -> list[dict]:
|
|
386
430
|
"""
|
|
387
431
|
Get tasks requiring feedback from the current user.
|
|
388
432
|
|
|
@@ -393,7 +437,7 @@ def all_tasks_requiring_feedback(client=default):
|
|
|
393
437
|
|
|
394
438
|
|
|
395
439
|
@cache
|
|
396
|
-
def all_filter_groups(client=default):
|
|
440
|
+
def all_filter_groups(client: KitsuClient = default) -> list[dict]:
|
|
397
441
|
"""
|
|
398
442
|
Get all filter groups for current user.
|
|
399
443
|
|
|
@@ -403,13 +447,15 @@ def all_filter_groups(client=default):
|
|
|
403
447
|
return raw.fetch_all("user/filter-groups", client=client)
|
|
404
448
|
|
|
405
449
|
|
|
406
|
-
def new_filter_group(
|
|
450
|
+
def new_filter_group(
|
|
451
|
+
name: str, project: str | dict | None = None, client: KitsuClient = default
|
|
452
|
+
) -> dict:
|
|
407
453
|
"""
|
|
408
454
|
Create a new filter group for current user.
|
|
409
455
|
|
|
410
456
|
Args:
|
|
411
457
|
name (str): The filter group name.
|
|
412
|
-
project (
|
|
458
|
+
project (str / dict): The project dict or id.
|
|
413
459
|
|
|
414
460
|
Returns:
|
|
415
461
|
dict: Created filter group.
|
|
@@ -427,12 +473,14 @@ def new_filter_group(name, project=None, client=default):
|
|
|
427
473
|
|
|
428
474
|
|
|
429
475
|
@cache
|
|
430
|
-
def get_filter_group(
|
|
476
|
+
def get_filter_group(
|
|
477
|
+
filter_group: str | dict, client: KitsuClient = default
|
|
478
|
+
) -> dict:
|
|
431
479
|
"""
|
|
432
480
|
Get a filter group.
|
|
433
481
|
|
|
434
482
|
Args:
|
|
435
|
-
filter_group (
|
|
483
|
+
filter_group (str / dict): The filter group dict or id.
|
|
436
484
|
|
|
437
485
|
Returns:
|
|
438
486
|
dict: Filter group.
|
|
@@ -443,7 +491,9 @@ def get_filter_group(filter_group, client=default):
|
|
|
443
491
|
)
|
|
444
492
|
|
|
445
493
|
|
|
446
|
-
def update_filter_group(
|
|
494
|
+
def update_filter_group(
|
|
495
|
+
filter_group: dict, client: KitsuClient = default
|
|
496
|
+
) -> dict:
|
|
447
497
|
"""
|
|
448
498
|
Update a filter group.
|
|
449
499
|
|
|
@@ -460,12 +510,14 @@ def update_filter_group(filter_group, client=default):
|
|
|
460
510
|
)
|
|
461
511
|
|
|
462
512
|
|
|
463
|
-
def remove_filter_group(
|
|
513
|
+
def remove_filter_group(
|
|
514
|
+
filter_group: str | dict, client: KitsuClient = default
|
|
515
|
+
) -> str:
|
|
464
516
|
"""
|
|
465
517
|
Remove given filter group from database.
|
|
466
518
|
|
|
467
519
|
Args:
|
|
468
|
-
filter_group (
|
|
520
|
+
filter_group (str / dict): The filter group dict or id.
|
|
469
521
|
"""
|
|
470
522
|
filter_group = normalize_model_parameter(filter_group)
|
|
471
523
|
return raw.delete(
|
|
@@ -474,7 +526,7 @@ def remove_filter_group(filter_group, client=default):
|
|
|
474
526
|
|
|
475
527
|
|
|
476
528
|
@cache
|
|
477
|
-
def all_desktop_login_logs(client=default):
|
|
529
|
+
def all_desktop_login_logs(client: KitsuClient = default) -> list:
|
|
478
530
|
"""
|
|
479
531
|
Get desktop login logs for current user.
|
|
480
532
|
|
|
@@ -485,7 +537,7 @@ def all_desktop_login_logs(client=default):
|
|
|
485
537
|
|
|
486
538
|
|
|
487
539
|
@cache
|
|
488
|
-
def get_time_spents_by_date(date, client=default):
|
|
540
|
+
def get_time_spents_by_date(date: str, client: KitsuClient = default) -> list:
|
|
489
541
|
"""
|
|
490
542
|
Get time spents for a specific date.
|
|
491
543
|
|
|
@@ -495,16 +547,20 @@ def get_time_spents_by_date(date, client=default):
|
|
|
495
547
|
Returns:
|
|
496
548
|
list: Time spents for the date.
|
|
497
549
|
"""
|
|
498
|
-
return raw.get(
|
|
550
|
+
return raw.get(
|
|
551
|
+
"data/user/time-spents/by-date", params={"date": date}, client=client
|
|
552
|
+
)
|
|
499
553
|
|
|
500
554
|
|
|
501
555
|
@cache
|
|
502
|
-
def get_task_time_spent(
|
|
556
|
+
def get_task_time_spent(
|
|
557
|
+
task: str | dict, client: KitsuClient = default
|
|
558
|
+
) -> dict:
|
|
503
559
|
"""
|
|
504
560
|
Get time spent for a specific task.
|
|
505
561
|
|
|
506
562
|
Args:
|
|
507
|
-
task (
|
|
563
|
+
task (str / dict): The task dict or id.
|
|
508
564
|
|
|
509
565
|
Returns:
|
|
510
566
|
dict: Time spent information for the task.
|
|
@@ -515,7 +571,7 @@ def get_task_time_spent(task, client=default):
|
|
|
515
571
|
|
|
516
572
|
|
|
517
573
|
@cache
|
|
518
|
-
def get_day_off(client=default):
|
|
574
|
+
def get_day_off(client: KitsuClient = default) -> dict:
|
|
519
575
|
"""
|
|
520
576
|
Get day off information for current user.
|
|
521
577
|
|
|
@@ -526,7 +582,7 @@ def get_day_off(client=default):
|
|
|
526
582
|
|
|
527
583
|
|
|
528
584
|
@cache
|
|
529
|
-
def all_notifications(client=default):
|
|
585
|
+
def all_notifications(client: KitsuClient = default) -> list[dict]:
|
|
530
586
|
"""
|
|
531
587
|
Get all notifications for current user.
|
|
532
588
|
|
|
@@ -537,12 +593,14 @@ def all_notifications(client=default):
|
|
|
537
593
|
|
|
538
594
|
|
|
539
595
|
@cache
|
|
540
|
-
def get_notification(
|
|
596
|
+
def get_notification(
|
|
597
|
+
notification: str | dict, client: KitsuClient = default
|
|
598
|
+
) -> dict:
|
|
541
599
|
"""
|
|
542
600
|
Get a specific notification.
|
|
543
601
|
|
|
544
602
|
Args:
|
|
545
|
-
notification (
|
|
603
|
+
notification (str / dict): The notification dict or id.
|
|
546
604
|
|
|
547
605
|
Returns:
|
|
548
606
|
dict: Notification.
|
|
@@ -553,7 +611,9 @@ def get_notification(notification, client=default):
|
|
|
553
611
|
)
|
|
554
612
|
|
|
555
613
|
|
|
556
|
-
def update_notification(
|
|
614
|
+
def update_notification(
|
|
615
|
+
notification: dict, client: KitsuClient = default
|
|
616
|
+
) -> dict:
|
|
557
617
|
"""
|
|
558
618
|
Update a notification.
|
|
559
619
|
|
|
@@ -571,12 +631,14 @@ def update_notification(notification, client=default):
|
|
|
571
631
|
|
|
572
632
|
|
|
573
633
|
@cache
|
|
574
|
-
def check_task_subscription(
|
|
634
|
+
def check_task_subscription(
|
|
635
|
+
task: str | dict, client: KitsuClient = default
|
|
636
|
+
) -> dict:
|
|
575
637
|
"""
|
|
576
638
|
Check if user is subscribed to a task.
|
|
577
639
|
|
|
578
640
|
Args:
|
|
579
|
-
task (
|
|
641
|
+
task (str / dict): The task dict or id.
|
|
580
642
|
|
|
581
643
|
Returns:
|
|
582
644
|
dict: Subscription status.
|
|
@@ -586,12 +648,12 @@ def check_task_subscription(task, client=default):
|
|
|
586
648
|
return raw.get(path, client=client)
|
|
587
649
|
|
|
588
650
|
|
|
589
|
-
def subscribe_to_task(task, client=default):
|
|
651
|
+
def subscribe_to_task(task: str | dict, client: KitsuClient = default) -> dict:
|
|
590
652
|
"""
|
|
591
653
|
Subscribe to a task.
|
|
592
654
|
|
|
593
655
|
Args:
|
|
594
|
-
task (
|
|
656
|
+
task (str / dict): The task dict or id.
|
|
595
657
|
|
|
596
658
|
Returns:
|
|
597
659
|
dict: Subscription information.
|
|
@@ -601,12 +663,14 @@ def subscribe_to_task(task, client=default):
|
|
|
601
663
|
return raw.post(path, {}, client=client)
|
|
602
664
|
|
|
603
665
|
|
|
604
|
-
def unsubscribe_from_task(
|
|
666
|
+
def unsubscribe_from_task(
|
|
667
|
+
task: str | dict, client: KitsuClient = default
|
|
668
|
+
) -> str:
|
|
605
669
|
"""
|
|
606
670
|
Unsubscribe from a task.
|
|
607
671
|
|
|
608
672
|
Args:
|
|
609
|
-
task (
|
|
673
|
+
task (str / dict): The task dict or id.
|
|
610
674
|
"""
|
|
611
675
|
task = normalize_model_parameter(task)
|
|
612
676
|
path = "data/user/tasks/%s/unsubscribe" % task["id"]
|
|
@@ -614,7 +678,7 @@ def unsubscribe_from_task(task, client=default):
|
|
|
614
678
|
|
|
615
679
|
|
|
616
680
|
@cache
|
|
617
|
-
def all_chats(client=default):
|
|
681
|
+
def all_chats(client: KitsuClient = default) -> list[dict]:
|
|
618
682
|
"""
|
|
619
683
|
Get all chats for current user.
|
|
620
684
|
|
|
@@ -624,12 +688,12 @@ def all_chats(client=default):
|
|
|
624
688
|
return raw.fetch_all("user/chats", client=client)
|
|
625
689
|
|
|
626
690
|
|
|
627
|
-
def join_chat(chat, client=default):
|
|
691
|
+
def join_chat(chat: str | dict, client: KitsuClient = default) -> dict:
|
|
628
692
|
"""
|
|
629
693
|
Join a chat.
|
|
630
694
|
|
|
631
695
|
Args:
|
|
632
|
-
chat (
|
|
696
|
+
chat (str / dict): The chat dict or id.
|
|
633
697
|
|
|
634
698
|
Returns:
|
|
635
699
|
dict: Chat information.
|
|
@@ -639,28 +703,28 @@ def join_chat(chat, client=default):
|
|
|
639
703
|
return raw.post(path, {}, client=client)
|
|
640
704
|
|
|
641
705
|
|
|
642
|
-
def leave_chat(chat, client=default):
|
|
706
|
+
def leave_chat(chat: str | dict, client: KitsuClient = default) -> str:
|
|
643
707
|
"""
|
|
644
708
|
Leave a chat.
|
|
645
709
|
|
|
646
710
|
Args:
|
|
647
|
-
chat (
|
|
711
|
+
chat (str / dict): The chat dict or id.
|
|
648
712
|
"""
|
|
649
713
|
chat = normalize_model_parameter(chat)
|
|
650
714
|
path = "data/user/chats/%s/leave" % chat["id"]
|
|
651
715
|
return raw.delete(path, client=client)
|
|
652
716
|
|
|
653
717
|
|
|
654
|
-
def clear_avatar(client=default):
|
|
718
|
+
def clear_avatar(client: KitsuClient = default) -> str:
|
|
655
719
|
"""
|
|
656
720
|
Clear user avatar.
|
|
657
|
-
|
|
658
|
-
Returns:
|
|
659
|
-
Response: Request response object.
|
|
660
721
|
"""
|
|
661
722
|
return raw.delete("data/user/avatar", client=client)
|
|
662
723
|
|
|
663
|
-
|
|
724
|
+
|
|
725
|
+
def mark_all_notifications_as_read(
|
|
726
|
+
client: KitsuClient = default,
|
|
727
|
+
) -> dict[Literal["success"], bool]:
|
|
664
728
|
"""
|
|
665
729
|
Mark all notifications as read for current user.
|
|
666
730
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gazu
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Gazu is a client for Zou, the API to store the data of your CG production.
|
|
5
5
|
Home-page: https://gazu.cg-wire.com/
|
|
6
6
|
Author: CG Wire
|
|
@@ -28,6 +28,7 @@ Requires-Dist: python-socketio[client]<6,>=5.11.0
|
|
|
28
28
|
Requires-Dist: requests>=2.25.1
|
|
29
29
|
Requires-Dist: Deprecated==1.3.1
|
|
30
30
|
Requires-Dist: pywin32>=308; sys_platform == "win32"
|
|
31
|
+
Requires-Dist: typing_extensions==4.7.1
|
|
31
32
|
Provides-Extra: dev
|
|
32
33
|
Requires-Dist: wheel; extra == "dev"
|
|
33
34
|
Provides-Extra: test
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
gazu/__init__.py,sha256=KPAVnFOSbzZnd24ItkZEOv7yQ5w0Pv7k1TFmL8saiqY,2594
|
|
2
|
+
gazu/__version__.py,sha256=LGVQyDsWifdACo7qztwb8RWWHds1E7uQ-ZqD8SAjyw4,22
|
|
3
|
+
gazu/asset.py,sha256=5FThof1lbl12yEbfUE68GtYFX1e7Z-l6EUj4v_AX1a8,18193
|
|
4
|
+
gazu/cache.py,sha256=6CR_1gYVPrGDGYaFQLlPQFIQSeS_PCC37euYow5U7vk,6306
|
|
5
|
+
gazu/casting.py,sha256=A0E5D8E7c2rcktuRJbQkpjD1H0D-CRxRVJPGTdjQZ7c,10790
|
|
6
|
+
gazu/client.py,sha256=RFhcjEPEF7O38CLfgtlgjCG1gOkLUbyJc6xt9GNU3wE,24276
|
|
7
|
+
gazu/concept.py,sha256=ddzfcEFFszaLCzt30leLfkxmxQH-DQfDpz9gFBbfxpA,4464
|
|
8
|
+
gazu/context.py,sha256=oXlQYGR9NJ8UaAMPrNhUAGlT63S15aRk1zT7LEhnFEE,4933
|
|
9
|
+
gazu/edit.py,sha256=9bDEhTnfh7fjdUCUrKmt4QhgwfHvLaMh1H1jxI706iY,5400
|
|
10
|
+
gazu/encoder.py,sha256=DSnz8RmZt-G1dbn_sj2iyoy5JeaKYGkxqSFI1bt5Suo,430
|
|
11
|
+
gazu/entity.py,sha256=eXeM2_5xGe70U7ROseOXdaNzpOr61m_nq5tIGh-nBVA,4908
|
|
12
|
+
gazu/events.py,sha256=IJsmt6ZmEjE-RkqJawGN4a2gjLOGttSJdnyRan4JUfo,2329
|
|
13
|
+
gazu/exception.py,sha256=Y0kVNm6h-uXLEU1sNIbMSUep7Zxk738uYHOIVs2waM8,1880
|
|
14
|
+
gazu/files.py,sha256=26qD-Z5TIyCagSdkhn5vbplm34xdqP2CkVBWVjjcyvg,54647
|
|
15
|
+
gazu/helpers.py,sha256=HcH1q9BQvcDzPo2O7WE-6bJZPf_ekLtwdwfPDIhwFRg,4097
|
|
16
|
+
gazu/person.py,sha256=XTKx6QXAXSaRoyERMkboVKsNcJL3vFYfhU1UPhSsN48,19711
|
|
17
|
+
gazu/playlist.py,sha256=4dNoz1tn9a0ZJJBomXmtI4sauZjjK3r6X4IAWKI-oZ8,12698
|
|
18
|
+
gazu/project.py,sha256=0Sp3T61_m61X8VIOgDoydk8AHJOdgxe55mIuR7ezMEM,27173
|
|
19
|
+
gazu/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
|
+
gazu/scene.py,sha256=Jry6J7x6pUOQrSMrLOJDTH5b8-7ezUxQ-VS_o6sazWE,6308
|
|
21
|
+
gazu/search.py,sha256=9A7MzfavrR2XiJwB4FRKQnfpHI0wwZLx6k1wHLMw934,1219
|
|
22
|
+
gazu/shot.py,sha256=qEw6DwzH-k_8Y48aIauL7XmORTOg54tekdnnQbK3fXw,23380
|
|
23
|
+
gazu/sorting.py,sha256=NccSw_ENDAGfWSqVi2GPMg5SIh7IBhMY3F0tkalBdMU,329
|
|
24
|
+
gazu/sync.py,sha256=iwZX4Ec5qA-ICLp5LhZ-3yglDgz47nb07Mw3qYyWWLQ,23773
|
|
25
|
+
gazu/task.py,sha256=eu3aNdoJzXbeTYEjnFyw4MOX9iwFJ7MHp1L0-ooxzvg,58123
|
|
26
|
+
gazu/user.py,sha256=3v72ZG7dW8VByZMF6zrbMXZh34ppKNKXcWXkZO608HQ,18471
|
|
27
|
+
gazu-1.1.0.dist-info/licenses/LICENSE,sha256=2n6rt7r999OuXp8iOqW9we7ORaxWncIbOwN1ILRGR2g,7651
|
|
28
|
+
gazu-1.1.0.dist-info/METADATA,sha256=CUebvelh2FWyux1D3U4GrUOTbocLDHa29HWpHk1RTa8,5378
|
|
29
|
+
gazu-1.1.0.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
|
|
30
|
+
gazu-1.1.0.dist-info/top_level.txt,sha256=nv7fRIVpYYyIlk_66hBmMyvWcSC7UU-r-GE8uC1u1Go,5
|
|
31
|
+
gazu-1.1.0.dist-info/RECORD,,
|
gazu-1.0.2.dist-info/RECORD
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
gazu/__init__.py,sha256=KPAVnFOSbzZnd24ItkZEOv7yQ5w0Pv7k1TFmL8saiqY,2594
|
|
2
|
-
gazu/__version__.py,sha256=Y3LSfRioSl2xch70pq_ULlvyECXyEtN3krVaWeGyaxk,22
|
|
3
|
-
gazu/asset.py,sha256=ZAc8F-7GPQTU_nVcUpH_xSVf58k6TXudlP6XnFc_LJk,14686
|
|
4
|
-
gazu/cache.py,sha256=MnxrnfYN7wHNTTL7qzkEpYCYzWcolT56fqQ0_RegMbE,5879
|
|
5
|
-
gazu/casting.py,sha256=0LTdsHaCTHSKEflBWFeuraSaYNYetGkMHAIdg6Lv81U,5059
|
|
6
|
-
gazu/client.py,sha256=TNxUOy_kVKnMSLxQFC-fFPqPPE8BaIvL37ExeW2TI5k,22162
|
|
7
|
-
gazu/concept.py,sha256=GcOPEmkbtZcSwlX8tnUj9Q5DTPBprSxtmXhlq7ioPwk,3727
|
|
8
|
-
gazu/context.py,sha256=iUyug8EUz3kkF-kmYlH5JuLp66TUqR3uhAq7CouVd_U,4349
|
|
9
|
-
gazu/edit.py,sha256=v6Zqbk2tiZlwjHhlzPPbR8GJwfWn7X3GU9LzN-cpHSw,4623
|
|
10
|
-
gazu/encoder.py,sha256=dj8U5mlGVy0GeaA7HIIdPSRdKswUQ8h4DzjFKLhwvR0,394
|
|
11
|
-
gazu/entity.py,sha256=p0ZvvRvAjj_B7dOn-pi8_zot_23L9YCsuCsDLPD9d4M,4007
|
|
12
|
-
gazu/events.py,sha256=4j8wbF4K-f5Kyu_jI4bklS12huzAN0cjCdY4hcKyhuk,2221
|
|
13
|
-
gazu/exception.py,sha256=Y0kVNm6h-uXLEU1sNIbMSUep7Zxk738uYHOIVs2waM8,1880
|
|
14
|
-
gazu/files.py,sha256=tEKXY43JRNb00W6IPSt8SWlKtFtk3LI3FfbKTe26aao,40702
|
|
15
|
-
gazu/helpers.py,sha256=Qa4JlZitiXsfYMJGGuwVaedLvHQVMbIwcqEZ099EjMw,3916
|
|
16
|
-
gazu/person.py,sha256=jmJ1fdtJKIUqAzTv-wngxSJ_fpbiyTLYu5w9rGATaKw,16480
|
|
17
|
-
gazu/playlist.py,sha256=JntIAJf9-cqF5fV85VU-J15fC9aladQx_77qg3XU8W0,10928
|
|
18
|
-
gazu/project.py,sha256=teHqfJldOO6pJWKm6_dkO-JpPdSmKbj0i4jYxCipL8o,23945
|
|
19
|
-
gazu/scene.py,sha256=Q4AVmiMfGhSZfaXwOceyR-taTlpx1WCELe0UBSiHm8o,5357
|
|
20
|
-
gazu/search.py,sha256=ZUeRChEMgnOTnNV_xIhXQia3xXcWG3ro1Sl9ZbYnLtY,1045
|
|
21
|
-
gazu/shot.py,sha256=_cSqm_TvvDnezA5gZTrMf5_RqVLic39bp0IGFwewuy8,18937
|
|
22
|
-
gazu/sorting.py,sha256=qSIO0pOHkj0Tl4gm9BJrYrcifWGGGmsW68Pl86zB_bg,266
|
|
23
|
-
gazu/sync.py,sha256=3clThVFC9pSIQiCyVkNRPnlbYQDA2kfR-lxaWxHbeUk,21611
|
|
24
|
-
gazu/task.py,sha256=hCGWz2T323s-E_v70_dfv4vWC-faIG_2lW6ifi08JgM,48217
|
|
25
|
-
gazu/user.py,sha256=NxHVzmX3KrVqai3WDHzvYlR97ME7tOpYYr99l_WRsck,16502
|
|
26
|
-
gazu-1.0.2.dist-info/licenses/LICENSE,sha256=2n6rt7r999OuXp8iOqW9we7ORaxWncIbOwN1ILRGR2g,7651
|
|
27
|
-
gazu-1.0.2.dist-info/METADATA,sha256=_AXERmqlGCHGS-anUqemJkVXmvuWhfFL-0jIQJVJHC4,5338
|
|
28
|
-
gazu-1.0.2.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
|
|
29
|
-
gazu-1.0.2.dist-info/top_level.txt,sha256=nv7fRIVpYYyIlk_66hBmMyvWcSC7UU-r-GE8uC1u1Go,5
|
|
30
|
-
gazu-1.0.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|