studyfetch-sdk 0.1.0a4__py3-none-any.whl → 0.1.0a6__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.
- studyfetch_sdk/_version.py +1 -1
- studyfetch_sdk/resources/v1/__init__.py +12 -12
- studyfetch_sdk/resources/v1/chat/chat.py +13 -15
- studyfetch_sdk/resources/v1/components.py +40 -37
- studyfetch_sdk/resources/v1/explainers.py +234 -9
- studyfetch_sdk/resources/v1/flashcards.py +15 -15
- studyfetch_sdk/resources/v1/materials/materials.py +19 -20
- studyfetch_sdk/resources/v1/materials/upload.py +19 -20
- studyfetch_sdk/resources/v1/scenarios/component.py +116 -12
- studyfetch_sdk/resources/v1/scenarios/scenarios.py +255 -19
- studyfetch_sdk/resources/v1/scenarios/submissions/user.py +50 -50
- studyfetch_sdk/resources/v1/v1.py +48 -48
- studyfetch_sdk/types/v1/__init__.py +8 -11
- studyfetch_sdk/types/v1/{chat_retrieve_session_params.py → chat_get_session_params.py} +2 -2
- studyfetch_sdk/types/v1/{component_create_response.py → component.py} +2 -2
- studyfetch_sdk/types/v1/component_create_params.py +60 -6
- studyfetch_sdk/types/v1/{component_embed_params.py → component_generate_embed_params.py} +2 -2
- studyfetch_sdk/types/v1/{component_embed_response.py → component_generate_embed_response.py} +2 -2
- studyfetch_sdk/types/v1/component_list_response.py +5 -46
- studyfetch_sdk/types/v1/explainer_create_params.py +45 -0
- studyfetch_sdk/types/v1/explainer_handle_webhook_params.py +45 -3
- studyfetch_sdk/types/v1/{flashcard_get_algorithm_info_response.py → flashcard_get_algorithm_response.py} +2 -2
- studyfetch_sdk/types/v1/{material_create_response.py → material.py} +2 -2
- studyfetch_sdk/types/v1/material_list_response.py +5 -60
- studyfetch_sdk/types/v1/materials/__init__.py +0 -2
- studyfetch_sdk/types/v1/scenario_create_params.py +39 -2
- studyfetch_sdk/types/v1/scenario_submit_answer_params.py +18 -0
- studyfetch_sdk/types/v1/scenario_update_params.py +39 -2
- studyfetch_sdk/types/v1/scenarios/component_update_params.py +39 -2
- {studyfetch_sdk-0.1.0a4.dist-info → studyfetch_sdk-0.1.0a6.dist-info}/METADATA +28 -12
- {studyfetch_sdk-0.1.0a4.dist-info → studyfetch_sdk-0.1.0a6.dist-info}/RECORD +33 -43
- studyfetch_sdk/types/v1/admin/__init__.py +0 -3
- studyfetch_sdk/types/v1/admin/organizations/__init__.py +0 -3
- studyfetch_sdk/types/v1/admin/organizations/models/__init__.py +0 -3
- studyfetch_sdk/types/v1/component_retrieve_response.py +0 -48
- studyfetch_sdk/types/v1/component_update_response.py +0 -48
- studyfetch_sdk/types/v1/material_retrieve_response.py +0 -62
- studyfetch_sdk/types/v1/materials/upload_upload_file_response.py +0 -62
- studyfetch_sdk/types/v1/materials/upload_upload_from_url_response.py +0 -62
- studyfetch_sdk/types/v1/organizations/__init__.py +0 -3
- studyfetch_sdk/types/v1/organizations/logo/__init__.py +0 -3
- studyfetch_sdk/types/v1/organizations/profile/__init__.py +0 -3
- studyfetch_sdk/types/v1/organizations/team/__init__.py +0 -3
- {studyfetch_sdk-0.1.0a4.dist-info → studyfetch_sdk-0.1.0a6.dist-info}/WHEEL +0 -0
- {studyfetch_sdk-0.1.0a4.dist-info → studyfetch_sdk-0.1.0a6.dist-info}/licenses/LICENSE +0 -0
@@ -2,12 +2,15 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
|
+
from typing import List
|
6
|
+
from typing_extensions import Literal
|
7
|
+
|
5
8
|
import httpx
|
6
9
|
|
7
10
|
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
8
11
|
from ..._utils import maybe_transform, async_maybe_transform
|
9
12
|
from ..._compat import cached_property
|
10
|
-
from ...types.v1 import explainer_handle_webhook_params
|
13
|
+
from ...types.v1 import explainer_create_params, explainer_handle_webhook_params
|
11
14
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
12
15
|
from ..._response import (
|
13
16
|
to_raw_response_wrapper,
|
@@ -43,6 +46,17 @@ class ExplainersResource(SyncAPIResource):
|
|
43
46
|
def create(
|
44
47
|
self,
|
45
48
|
*,
|
49
|
+
component_id: str,
|
50
|
+
folder_ids: List[str],
|
51
|
+
material_ids: List[str],
|
52
|
+
target_length: float,
|
53
|
+
title: str,
|
54
|
+
image_search: bool | NotGiven = NOT_GIVEN,
|
55
|
+
model: str | NotGiven = NOT_GIVEN,
|
56
|
+
style: str | NotGiven = NOT_GIVEN,
|
57
|
+
user_id: str | NotGiven = NOT_GIVEN,
|
58
|
+
vertical_video: bool | NotGiven = NOT_GIVEN,
|
59
|
+
web_search: bool | NotGiven = NOT_GIVEN,
|
46
60
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
47
61
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
48
62
|
extra_headers: Headers | None = None,
|
@@ -50,10 +64,93 @@ class ExplainersResource(SyncAPIResource):
|
|
50
64
|
extra_body: Body | None = None,
|
51
65
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
52
66
|
) -> None:
|
53
|
-
"""
|
67
|
+
"""
|
68
|
+
Create explainers component
|
69
|
+
|
70
|
+
Args:
|
71
|
+
component_id: Component ID
|
72
|
+
|
73
|
+
folder_ids: Folder IDs to include
|
74
|
+
|
75
|
+
material_ids: Material IDs to include
|
76
|
+
|
77
|
+
target_length: Target video length in seconds
|
78
|
+
|
79
|
+
title: Title for the explainer video
|
80
|
+
|
81
|
+
image_search: Enable image search for visuals
|
82
|
+
|
83
|
+
model: AI model to use
|
84
|
+
|
85
|
+
style: Video style
|
86
|
+
|
87
|
+
user_id: User ID
|
88
|
+
|
89
|
+
vertical_video: Create vertical video format (9:16)
|
90
|
+
|
91
|
+
web_search: Enable web search for additional content
|
92
|
+
|
93
|
+
extra_headers: Send extra headers
|
94
|
+
|
95
|
+
extra_query: Add additional query parameters to the request
|
96
|
+
|
97
|
+
extra_body: Add additional JSON properties to the request
|
98
|
+
|
99
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
100
|
+
"""
|
54
101
|
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
55
102
|
return self._post(
|
56
103
|
"/api/v1/explainers/create",
|
104
|
+
body=maybe_transform(
|
105
|
+
{
|
106
|
+
"component_id": component_id,
|
107
|
+
"folder_ids": folder_ids,
|
108
|
+
"material_ids": material_ids,
|
109
|
+
"target_length": target_length,
|
110
|
+
"title": title,
|
111
|
+
"image_search": image_search,
|
112
|
+
"model": model,
|
113
|
+
"style": style,
|
114
|
+
"user_id": user_id,
|
115
|
+
"vertical_video": vertical_video,
|
116
|
+
"web_search": web_search,
|
117
|
+
},
|
118
|
+
explainer_create_params.ExplainerCreateParams,
|
119
|
+
),
|
120
|
+
options=make_request_options(
|
121
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
122
|
+
),
|
123
|
+
cast_to=NoneType,
|
124
|
+
)
|
125
|
+
|
126
|
+
def retrieve(
|
127
|
+
self,
|
128
|
+
component_id: str,
|
129
|
+
*,
|
130
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
131
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
132
|
+
extra_headers: Headers | None = None,
|
133
|
+
extra_query: Query | None = None,
|
134
|
+
extra_body: Body | None = None,
|
135
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
136
|
+
) -> None:
|
137
|
+
"""
|
138
|
+
Get explainer video by component ID
|
139
|
+
|
140
|
+
Args:
|
141
|
+
extra_headers: Send extra headers
|
142
|
+
|
143
|
+
extra_query: Add additional query parameters to the request
|
144
|
+
|
145
|
+
extra_body: Add additional JSON properties to the request
|
146
|
+
|
147
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
148
|
+
"""
|
149
|
+
if not component_id:
|
150
|
+
raise ValueError(f"Expected a non-empty value for `component_id` but received {component_id!r}")
|
151
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
152
|
+
return self._get(
|
153
|
+
f"/api/v1/explainers/component/{component_id}",
|
57
154
|
options=make_request_options(
|
58
155
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
59
156
|
),
|
@@ -63,7 +160,8 @@ class ExplainersResource(SyncAPIResource):
|
|
63
160
|
def handle_webhook(
|
64
161
|
self,
|
65
162
|
*,
|
66
|
-
|
163
|
+
event: Literal["video.completed", "video.progress", "video.failed"],
|
164
|
+
video: explainer_handle_webhook_params.Video,
|
67
165
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
68
166
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
69
167
|
extra_headers: Headers | None = None,
|
@@ -72,9 +170,13 @@ class ExplainersResource(SyncAPIResource):
|
|
72
170
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
73
171
|
) -> None:
|
74
172
|
"""
|
75
|
-
Handle webhook events
|
173
|
+
Handle explainer video webhook events
|
76
174
|
|
77
175
|
Args:
|
176
|
+
event: Webhook event type
|
177
|
+
|
178
|
+
video: Video data
|
179
|
+
|
78
180
|
extra_headers: Send extra headers
|
79
181
|
|
80
182
|
extra_query: Add additional query parameters to the request
|
@@ -86,7 +188,13 @@ class ExplainersResource(SyncAPIResource):
|
|
86
188
|
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
87
189
|
return self._post(
|
88
190
|
"/api/v1/explainers/webhook",
|
89
|
-
body=maybe_transform(
|
191
|
+
body=maybe_transform(
|
192
|
+
{
|
193
|
+
"event": event,
|
194
|
+
"video": video,
|
195
|
+
},
|
196
|
+
explainer_handle_webhook_params.ExplainerHandleWebhookParams,
|
197
|
+
),
|
90
198
|
options=make_request_options(
|
91
199
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
92
200
|
),
|
@@ -117,6 +225,17 @@ class AsyncExplainersResource(AsyncAPIResource):
|
|
117
225
|
async def create(
|
118
226
|
self,
|
119
227
|
*,
|
228
|
+
component_id: str,
|
229
|
+
folder_ids: List[str],
|
230
|
+
material_ids: List[str],
|
231
|
+
target_length: float,
|
232
|
+
title: str,
|
233
|
+
image_search: bool | NotGiven = NOT_GIVEN,
|
234
|
+
model: str | NotGiven = NOT_GIVEN,
|
235
|
+
style: str | NotGiven = NOT_GIVEN,
|
236
|
+
user_id: str | NotGiven = NOT_GIVEN,
|
237
|
+
vertical_video: bool | NotGiven = NOT_GIVEN,
|
238
|
+
web_search: bool | NotGiven = NOT_GIVEN,
|
120
239
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
121
240
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
122
241
|
extra_headers: Headers | None = None,
|
@@ -124,10 +243,93 @@ class AsyncExplainersResource(AsyncAPIResource):
|
|
124
243
|
extra_body: Body | None = None,
|
125
244
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
126
245
|
) -> None:
|
127
|
-
"""
|
246
|
+
"""
|
247
|
+
Create explainers component
|
248
|
+
|
249
|
+
Args:
|
250
|
+
component_id: Component ID
|
251
|
+
|
252
|
+
folder_ids: Folder IDs to include
|
253
|
+
|
254
|
+
material_ids: Material IDs to include
|
255
|
+
|
256
|
+
target_length: Target video length in seconds
|
257
|
+
|
258
|
+
title: Title for the explainer video
|
259
|
+
|
260
|
+
image_search: Enable image search for visuals
|
261
|
+
|
262
|
+
model: AI model to use
|
263
|
+
|
264
|
+
style: Video style
|
265
|
+
|
266
|
+
user_id: User ID
|
267
|
+
|
268
|
+
vertical_video: Create vertical video format (9:16)
|
269
|
+
|
270
|
+
web_search: Enable web search for additional content
|
271
|
+
|
272
|
+
extra_headers: Send extra headers
|
273
|
+
|
274
|
+
extra_query: Add additional query parameters to the request
|
275
|
+
|
276
|
+
extra_body: Add additional JSON properties to the request
|
277
|
+
|
278
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
279
|
+
"""
|
128
280
|
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
129
281
|
return await self._post(
|
130
282
|
"/api/v1/explainers/create",
|
283
|
+
body=await async_maybe_transform(
|
284
|
+
{
|
285
|
+
"component_id": component_id,
|
286
|
+
"folder_ids": folder_ids,
|
287
|
+
"material_ids": material_ids,
|
288
|
+
"target_length": target_length,
|
289
|
+
"title": title,
|
290
|
+
"image_search": image_search,
|
291
|
+
"model": model,
|
292
|
+
"style": style,
|
293
|
+
"user_id": user_id,
|
294
|
+
"vertical_video": vertical_video,
|
295
|
+
"web_search": web_search,
|
296
|
+
},
|
297
|
+
explainer_create_params.ExplainerCreateParams,
|
298
|
+
),
|
299
|
+
options=make_request_options(
|
300
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
301
|
+
),
|
302
|
+
cast_to=NoneType,
|
303
|
+
)
|
304
|
+
|
305
|
+
async def retrieve(
|
306
|
+
self,
|
307
|
+
component_id: str,
|
308
|
+
*,
|
309
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
310
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
311
|
+
extra_headers: Headers | None = None,
|
312
|
+
extra_query: Query | None = None,
|
313
|
+
extra_body: Body | None = None,
|
314
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
315
|
+
) -> None:
|
316
|
+
"""
|
317
|
+
Get explainer video by component ID
|
318
|
+
|
319
|
+
Args:
|
320
|
+
extra_headers: Send extra headers
|
321
|
+
|
322
|
+
extra_query: Add additional query parameters to the request
|
323
|
+
|
324
|
+
extra_body: Add additional JSON properties to the request
|
325
|
+
|
326
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
327
|
+
"""
|
328
|
+
if not component_id:
|
329
|
+
raise ValueError(f"Expected a non-empty value for `component_id` but received {component_id!r}")
|
330
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
331
|
+
return await self._get(
|
332
|
+
f"/api/v1/explainers/component/{component_id}",
|
131
333
|
options=make_request_options(
|
132
334
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
133
335
|
),
|
@@ -137,7 +339,8 @@ class AsyncExplainersResource(AsyncAPIResource):
|
|
137
339
|
async def handle_webhook(
|
138
340
|
self,
|
139
341
|
*,
|
140
|
-
|
342
|
+
event: Literal["video.completed", "video.progress", "video.failed"],
|
343
|
+
video: explainer_handle_webhook_params.Video,
|
141
344
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
142
345
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
143
346
|
extra_headers: Headers | None = None,
|
@@ -146,9 +349,13 @@ class AsyncExplainersResource(AsyncAPIResource):
|
|
146
349
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
147
350
|
) -> None:
|
148
351
|
"""
|
149
|
-
Handle webhook events
|
352
|
+
Handle explainer video webhook events
|
150
353
|
|
151
354
|
Args:
|
355
|
+
event: Webhook event type
|
356
|
+
|
357
|
+
video: Video data
|
358
|
+
|
152
359
|
extra_headers: Send extra headers
|
153
360
|
|
154
361
|
extra_query: Add additional query parameters to the request
|
@@ -160,7 +367,13 @@ class AsyncExplainersResource(AsyncAPIResource):
|
|
160
367
|
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
161
368
|
return await self._post(
|
162
369
|
"/api/v1/explainers/webhook",
|
163
|
-
body=await async_maybe_transform(
|
370
|
+
body=await async_maybe_transform(
|
371
|
+
{
|
372
|
+
"event": event,
|
373
|
+
"video": video,
|
374
|
+
},
|
375
|
+
explainer_handle_webhook_params.ExplainerHandleWebhookParams,
|
376
|
+
),
|
164
377
|
options=make_request_options(
|
165
378
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
166
379
|
),
|
@@ -175,6 +388,9 @@ class ExplainersResourceWithRawResponse:
|
|
175
388
|
self.create = to_raw_response_wrapper(
|
176
389
|
explainers.create,
|
177
390
|
)
|
391
|
+
self.retrieve = to_raw_response_wrapper(
|
392
|
+
explainers.retrieve,
|
393
|
+
)
|
178
394
|
self.handle_webhook = to_raw_response_wrapper(
|
179
395
|
explainers.handle_webhook,
|
180
396
|
)
|
@@ -187,6 +403,9 @@ class AsyncExplainersResourceWithRawResponse:
|
|
187
403
|
self.create = async_to_raw_response_wrapper(
|
188
404
|
explainers.create,
|
189
405
|
)
|
406
|
+
self.retrieve = async_to_raw_response_wrapper(
|
407
|
+
explainers.retrieve,
|
408
|
+
)
|
190
409
|
self.handle_webhook = async_to_raw_response_wrapper(
|
191
410
|
explainers.handle_webhook,
|
192
411
|
)
|
@@ -199,6 +418,9 @@ class ExplainersResourceWithStreamingResponse:
|
|
199
418
|
self.create = to_streamed_response_wrapper(
|
200
419
|
explainers.create,
|
201
420
|
)
|
421
|
+
self.retrieve = to_streamed_response_wrapper(
|
422
|
+
explainers.retrieve,
|
423
|
+
)
|
202
424
|
self.handle_webhook = to_streamed_response_wrapper(
|
203
425
|
explainers.handle_webhook,
|
204
426
|
)
|
@@ -211,6 +433,9 @@ class AsyncExplainersResourceWithStreamingResponse:
|
|
211
433
|
self.create = async_to_streamed_response_wrapper(
|
212
434
|
explainers.create,
|
213
435
|
)
|
436
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
437
|
+
explainers.retrieve,
|
438
|
+
)
|
214
439
|
self.handle_webhook = async_to_streamed_response_wrapper(
|
215
440
|
explainers.handle_webhook,
|
216
441
|
)
|
@@ -26,7 +26,7 @@ from ..._response import (
|
|
26
26
|
from ..._base_client import make_request_options
|
27
27
|
from ...types.v1.flashcard_get_types_response import FlashcardGetTypesResponse
|
28
28
|
from ...types.v1.flashcard_batch_process_response import FlashcardBatchProcessResponse
|
29
|
-
from ...types.v1.
|
29
|
+
from ...types.v1.flashcard_get_algorithm_response import FlashcardGetAlgorithmResponse
|
30
30
|
|
31
31
|
__all__ = ["FlashcardsResource", "AsyncFlashcardsResource"]
|
32
32
|
|
@@ -99,7 +99,7 @@ class FlashcardsResource(SyncAPIResource):
|
|
99
99
|
cast_to=FlashcardBatchProcessResponse,
|
100
100
|
)
|
101
101
|
|
102
|
-
def
|
102
|
+
def get_algorithm(
|
103
103
|
self,
|
104
104
|
*,
|
105
105
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
@@ -108,14 +108,14 @@ class FlashcardsResource(SyncAPIResource):
|
|
108
108
|
extra_query: Query | None = None,
|
109
109
|
extra_body: Body | None = None,
|
110
110
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
111
|
-
) ->
|
111
|
+
) -> FlashcardGetAlgorithmResponse:
|
112
112
|
"""Get spaced repetition algorithm info"""
|
113
113
|
return self._get(
|
114
114
|
"/api/v1/flashcards/algorithm",
|
115
115
|
options=make_request_options(
|
116
116
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
117
117
|
),
|
118
|
-
cast_to=
|
118
|
+
cast_to=FlashcardGetAlgorithmResponse,
|
119
119
|
)
|
120
120
|
|
121
121
|
def get_all(
|
@@ -421,7 +421,7 @@ class AsyncFlashcardsResource(AsyncAPIResource):
|
|
421
421
|
cast_to=FlashcardBatchProcessResponse,
|
422
422
|
)
|
423
423
|
|
424
|
-
async def
|
424
|
+
async def get_algorithm(
|
425
425
|
self,
|
426
426
|
*,
|
427
427
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
@@ -430,14 +430,14 @@ class AsyncFlashcardsResource(AsyncAPIResource):
|
|
430
430
|
extra_query: Query | None = None,
|
431
431
|
extra_body: Body | None = None,
|
432
432
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
433
|
-
) ->
|
433
|
+
) -> FlashcardGetAlgorithmResponse:
|
434
434
|
"""Get spaced repetition algorithm info"""
|
435
435
|
return await self._get(
|
436
436
|
"/api/v1/flashcards/algorithm",
|
437
437
|
options=make_request_options(
|
438
438
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
439
439
|
),
|
440
|
-
cast_to=
|
440
|
+
cast_to=FlashcardGetAlgorithmResponse,
|
441
441
|
)
|
442
442
|
|
443
443
|
async def get_all(
|
@@ -682,8 +682,8 @@ class FlashcardsResourceWithRawResponse:
|
|
682
682
|
self.batch_process = to_raw_response_wrapper(
|
683
683
|
flashcards.batch_process,
|
684
684
|
)
|
685
|
-
self.
|
686
|
-
flashcards.
|
685
|
+
self.get_algorithm = to_raw_response_wrapper(
|
686
|
+
flashcards.get_algorithm,
|
687
687
|
)
|
688
688
|
self.get_all = to_raw_response_wrapper(
|
689
689
|
flashcards.get_all,
|
@@ -709,8 +709,8 @@ class AsyncFlashcardsResourceWithRawResponse:
|
|
709
709
|
self.batch_process = async_to_raw_response_wrapper(
|
710
710
|
flashcards.batch_process,
|
711
711
|
)
|
712
|
-
self.
|
713
|
-
flashcards.
|
712
|
+
self.get_algorithm = async_to_raw_response_wrapper(
|
713
|
+
flashcards.get_algorithm,
|
714
714
|
)
|
715
715
|
self.get_all = async_to_raw_response_wrapper(
|
716
716
|
flashcards.get_all,
|
@@ -736,8 +736,8 @@ class FlashcardsResourceWithStreamingResponse:
|
|
736
736
|
self.batch_process = to_streamed_response_wrapper(
|
737
737
|
flashcards.batch_process,
|
738
738
|
)
|
739
|
-
self.
|
740
|
-
flashcards.
|
739
|
+
self.get_algorithm = to_streamed_response_wrapper(
|
740
|
+
flashcards.get_algorithm,
|
741
741
|
)
|
742
742
|
self.get_all = to_streamed_response_wrapper(
|
743
743
|
flashcards.get_all,
|
@@ -763,8 +763,8 @@ class AsyncFlashcardsResourceWithStreamingResponse:
|
|
763
763
|
self.batch_process = async_to_streamed_response_wrapper(
|
764
764
|
flashcards.batch_process,
|
765
765
|
)
|
766
|
-
self.
|
767
|
-
flashcards.
|
766
|
+
self.get_algorithm = async_to_streamed_response_wrapper(
|
767
|
+
flashcards.get_algorithm,
|
768
768
|
)
|
769
769
|
self.get_all = async_to_streamed_response_wrapper(
|
770
770
|
flashcards.get_all,
|
@@ -40,9 +40,8 @@ from ...._response import (
|
|
40
40
|
async_to_streamed_response_wrapper,
|
41
41
|
)
|
42
42
|
from ...._base_client import make_request_options
|
43
|
+
from ....types.v1.material import Material
|
43
44
|
from ....types.v1.material_list_response import MaterialListResponse
|
44
|
-
from ....types.v1.material_create_response import MaterialCreateResponse
|
45
|
-
from ....types.v1.material_retrieve_response import MaterialRetrieveResponse
|
46
45
|
|
47
46
|
__all__ = ["MaterialsResource", "AsyncMaterialsResource"]
|
48
47
|
|
@@ -91,7 +90,7 @@ class MaterialsResource(SyncAPIResource):
|
|
91
90
|
extra_query: Query | None = None,
|
92
91
|
extra_body: Body | None = None,
|
93
92
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
94
|
-
) ->
|
93
|
+
) -> Material:
|
95
94
|
"""
|
96
95
|
Create a new material
|
97
96
|
|
@@ -123,7 +122,7 @@ class MaterialsResource(SyncAPIResource):
|
|
123
122
|
options=make_request_options(
|
124
123
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
125
124
|
),
|
126
|
-
cast_to=
|
125
|
+
cast_to=Material,
|
127
126
|
)
|
128
127
|
|
129
128
|
def retrieve(
|
@@ -136,7 +135,7 @@ class MaterialsResource(SyncAPIResource):
|
|
136
135
|
extra_query: Query | None = None,
|
137
136
|
extra_body: Body | None = None,
|
138
137
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
139
|
-
) ->
|
138
|
+
) -> Material:
|
140
139
|
"""
|
141
140
|
Get material by ID
|
142
141
|
|
@@ -156,7 +155,7 @@ class MaterialsResource(SyncAPIResource):
|
|
156
155
|
options=make_request_options(
|
157
156
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
158
157
|
),
|
159
|
-
cast_to=
|
158
|
+
cast_to=Material,
|
160
159
|
)
|
161
160
|
|
162
161
|
def list(
|
@@ -230,7 +229,7 @@ class MaterialsResource(SyncAPIResource):
|
|
230
229
|
cast_to=NoneType,
|
231
230
|
)
|
232
231
|
|
233
|
-
def
|
232
|
+
def batch_create(
|
234
233
|
self,
|
235
234
|
*,
|
236
235
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
@@ -480,7 +479,7 @@ class AsyncMaterialsResource(AsyncAPIResource):
|
|
480
479
|
extra_query: Query | None = None,
|
481
480
|
extra_body: Body | None = None,
|
482
481
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
483
|
-
) ->
|
482
|
+
) -> Material:
|
484
483
|
"""
|
485
484
|
Create a new material
|
486
485
|
|
@@ -512,7 +511,7 @@ class AsyncMaterialsResource(AsyncAPIResource):
|
|
512
511
|
options=make_request_options(
|
513
512
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
514
513
|
),
|
515
|
-
cast_to=
|
514
|
+
cast_to=Material,
|
516
515
|
)
|
517
516
|
|
518
517
|
async def retrieve(
|
@@ -525,7 +524,7 @@ class AsyncMaterialsResource(AsyncAPIResource):
|
|
525
524
|
extra_query: Query | None = None,
|
526
525
|
extra_body: Body | None = None,
|
527
526
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
528
|
-
) ->
|
527
|
+
) -> Material:
|
529
528
|
"""
|
530
529
|
Get material by ID
|
531
530
|
|
@@ -545,7 +544,7 @@ class AsyncMaterialsResource(AsyncAPIResource):
|
|
545
544
|
options=make_request_options(
|
546
545
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
547
546
|
),
|
548
|
-
cast_to=
|
547
|
+
cast_to=Material,
|
549
548
|
)
|
550
549
|
|
551
550
|
async def list(
|
@@ -619,7 +618,7 @@ class AsyncMaterialsResource(AsyncAPIResource):
|
|
619
618
|
cast_to=NoneType,
|
620
619
|
)
|
621
620
|
|
622
|
-
async def
|
621
|
+
async def batch_create(
|
623
622
|
self,
|
624
623
|
*,
|
625
624
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
@@ -841,8 +840,8 @@ class MaterialsResourceWithRawResponse:
|
|
841
840
|
self.delete = to_raw_response_wrapper(
|
842
841
|
materials.delete,
|
843
842
|
)
|
844
|
-
self.
|
845
|
-
materials.
|
843
|
+
self.batch_create = to_raw_response_wrapper(
|
844
|
+
materials.batch_create,
|
846
845
|
)
|
847
846
|
self.debug = to_raw_response_wrapper(
|
848
847
|
materials.debug,
|
@@ -892,8 +891,8 @@ class AsyncMaterialsResourceWithRawResponse:
|
|
892
891
|
self.delete = async_to_raw_response_wrapper(
|
893
892
|
materials.delete,
|
894
893
|
)
|
895
|
-
self.
|
896
|
-
materials.
|
894
|
+
self.batch_create = async_to_raw_response_wrapper(
|
895
|
+
materials.batch_create,
|
897
896
|
)
|
898
897
|
self.debug = async_to_raw_response_wrapper(
|
899
898
|
materials.debug,
|
@@ -943,8 +942,8 @@ class MaterialsResourceWithStreamingResponse:
|
|
943
942
|
self.delete = to_streamed_response_wrapper(
|
944
943
|
materials.delete,
|
945
944
|
)
|
946
|
-
self.
|
947
|
-
materials.
|
945
|
+
self.batch_create = to_streamed_response_wrapper(
|
946
|
+
materials.batch_create,
|
948
947
|
)
|
949
948
|
self.debug = to_streamed_response_wrapper(
|
950
949
|
materials.debug,
|
@@ -994,8 +993,8 @@ class AsyncMaterialsResourceWithStreamingResponse:
|
|
994
993
|
self.delete = async_to_streamed_response_wrapper(
|
995
994
|
materials.delete,
|
996
995
|
)
|
997
|
-
self.
|
998
|
-
materials.
|
996
|
+
self.batch_create = async_to_streamed_response_wrapper(
|
997
|
+
materials.batch_create,
|
999
998
|
)
|
1000
999
|
self.debug = async_to_streamed_response_wrapper(
|
1001
1000
|
materials.debug,
|