studyfetch-sdk 0.1.0a1__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/__init__.py +100 -0
- studyfetch_sdk/_base_client.py +1992 -0
- studyfetch_sdk/_client.py +403 -0
- studyfetch_sdk/_compat.py +219 -0
- studyfetch_sdk/_constants.py +14 -0
- studyfetch_sdk/_exceptions.py +108 -0
- studyfetch_sdk/_files.py +123 -0
- studyfetch_sdk/_models.py +808 -0
- studyfetch_sdk/_qs.py +150 -0
- studyfetch_sdk/_resource.py +43 -0
- studyfetch_sdk/_response.py +832 -0
- studyfetch_sdk/_streaming.py +333 -0
- studyfetch_sdk/_types.py +219 -0
- studyfetch_sdk/_utils/__init__.py +57 -0
- studyfetch_sdk/_utils/_logs.py +25 -0
- studyfetch_sdk/_utils/_proxy.py +65 -0
- studyfetch_sdk/_utils/_reflection.py +42 -0
- studyfetch_sdk/_utils/_resources_proxy.py +24 -0
- studyfetch_sdk/_utils/_streams.py +12 -0
- studyfetch_sdk/_utils/_sync.py +86 -0
- studyfetch_sdk/_utils/_transform.py +447 -0
- studyfetch_sdk/_utils/_typing.py +151 -0
- studyfetch_sdk/_utils/_utils.py +422 -0
- studyfetch_sdk/_version.py +4 -0
- studyfetch_sdk/lib/.keep +4 -0
- studyfetch_sdk/py.typed +0 -0
- studyfetch_sdk/resources/__init__.py +19 -0
- studyfetch_sdk/resources/v1/__init__.py +215 -0
- studyfetch_sdk/resources/v1/audio_recaps/__init__.py +33 -0
- studyfetch_sdk/resources/v1/audio_recaps/audio_recaps.py +328 -0
- studyfetch_sdk/resources/v1/audio_recaps/sections.py +250 -0
- studyfetch_sdk/resources/v1/auth/__init__.py +61 -0
- studyfetch_sdk/resources/v1/auth/auth.py +620 -0
- studyfetch_sdk/resources/v1/auth/login.py +374 -0
- studyfetch_sdk/resources/v1/auth/number_2fa.py +457 -0
- studyfetch_sdk/resources/v1/auth/organization_invites.py +160 -0
- studyfetch_sdk/resources/v1/chat/__init__.py +47 -0
- studyfetch_sdk/resources/v1/chat/chat.py +576 -0
- studyfetch_sdk/resources/v1/chat/sessions.py +222 -0
- studyfetch_sdk/resources/v1/chat/test.py +190 -0
- studyfetch_sdk/resources/v1/components.py +943 -0
- studyfetch_sdk/resources/v1/embed/__init__.py +33 -0
- studyfetch_sdk/resources/v1/embed/component.py +278 -0
- studyfetch_sdk/resources/v1/embed/embed.py +346 -0
- studyfetch_sdk/resources/v1/explainers.py +216 -0
- studyfetch_sdk/resources/v1/flashcards.py +783 -0
- studyfetch_sdk/resources/v1/folders.py +744 -0
- studyfetch_sdk/resources/v1/materials/__init__.py +61 -0
- studyfetch_sdk/resources/v1/materials/bulk.py +134 -0
- studyfetch_sdk/resources/v1/materials/materials.py +1029 -0
- studyfetch_sdk/resources/v1/materials/test.py +290 -0
- studyfetch_sdk/resources/v1/materials/upload.py +410 -0
- studyfetch_sdk/resources/v1/organizations/__init__.py +103 -0
- studyfetch_sdk/resources/v1/organizations/api_keys.py +260 -0
- studyfetch_sdk/resources/v1/organizations/logo/__init__.py +33 -0
- studyfetch_sdk/resources/v1/organizations/logo/logo.py +166 -0
- studyfetch_sdk/resources/v1/organizations/logo/upload.py +184 -0
- studyfetch_sdk/resources/v1/organizations/organizations.py +428 -0
- studyfetch_sdk/resources/v1/organizations/profile/__init__.py +47 -0
- studyfetch_sdk/resources/v1/organizations/profile/models.py +134 -0
- studyfetch_sdk/resources/v1/organizations/profile/profile.py +248 -0
- studyfetch_sdk/resources/v1/organizations/profile/team.py +462 -0
- studyfetch_sdk/resources/v1/organizations/team/__init__.py +33 -0
- studyfetch_sdk/resources/v1/organizations/team/invite.py +236 -0
- studyfetch_sdk/resources/v1/organizations/team/team.py +564 -0
- studyfetch_sdk/resources/v1/organizations/theme.py +184 -0
- studyfetch_sdk/resources/v1/organizations/usage.py +160 -0
- studyfetch_sdk/resources/v1/scenarios/__init__.py +61 -0
- studyfetch_sdk/resources/v1/scenarios/component.py +330 -0
- studyfetch_sdk/resources/v1/scenarios/scenarios.py +708 -0
- studyfetch_sdk/resources/v1/scenarios/sessions.py +236 -0
- studyfetch_sdk/resources/v1/scenarios/submissions/__init__.py +33 -0
- studyfetch_sdk/resources/v1/scenarios/submissions/submissions.py +102 -0
- studyfetch_sdk/resources/v1/scenarios/submissions/user.py +210 -0
- studyfetch_sdk/resources/v1/tests/__init__.py +33 -0
- studyfetch_sdk/resources/v1/tests/component.py +160 -0
- studyfetch_sdk/resources/v1/tests/tests.py +682 -0
- studyfetch_sdk/resources/v1/upload/__init__.py +33 -0
- studyfetch_sdk/resources/v1/upload/component.py +388 -0
- studyfetch_sdk/resources/v1/upload/upload.py +102 -0
- studyfetch_sdk/resources/v1/usage.py +1126 -0
- studyfetch_sdk/resources/v1/v1.py +518 -0
- studyfetch_sdk/types/__init__.py +3 -0
- studyfetch_sdk/types/v1/__init__.py +52 -0
- studyfetch_sdk/types/v1/admin/__init__.py +3 -0
- studyfetch_sdk/types/v1/admin/organizations/__init__.py +3 -0
- studyfetch_sdk/types/v1/admin/organizations/models/__init__.py +3 -0
- studyfetch_sdk/types/v1/audio_recaps/__init__.py +3 -0
- studyfetch_sdk/types/v1/auth/__init__.py +13 -0
- studyfetch_sdk/types/v1/auth/login_authenticate_params.py +15 -0
- studyfetch_sdk/types/v1/auth/login_verify_2fa_params.py +15 -0
- studyfetch_sdk/types/v1/auth/login_verify_backup_code_params.py +17 -0
- studyfetch_sdk/types/v1/auth/number_2fa_disable_params.py +12 -0
- studyfetch_sdk/types/v1/auth/number_2fa_enable_params.py +12 -0
- studyfetch_sdk/types/v1/auth/number_2fa_regenerate_backup_codes_params.py +12 -0
- studyfetch_sdk/types/v1/auth/number_2fa_send_code_params.py +12 -0
- studyfetch_sdk/types/v1/auth_register_new_user_params.py +23 -0
- studyfetch_sdk/types/v1/auth_request_password_reset_params.py +12 -0
- studyfetch_sdk/types/v1/auth_reset_password_params.py +17 -0
- studyfetch_sdk/types/v1/chat/__init__.py +5 -0
- studyfetch_sdk/types/v1/chat/session_retrieve_params.py +11 -0
- studyfetch_sdk/types/v1/chat_retrieve_session_params.py +13 -0
- studyfetch_sdk/types/v1/chat_send_message_params.py +54 -0
- studyfetch_sdk/types/v1/chat_stream_params.py +28 -0
- studyfetch_sdk/types/v1/component_create_params.py +29 -0
- studyfetch_sdk/types/v1/component_create_response.py +46 -0
- studyfetch_sdk/types/v1/component_embed_params.py +99 -0
- studyfetch_sdk/types/v1/component_embed_response.py +38 -0
- studyfetch_sdk/types/v1/component_list_params.py +14 -0
- studyfetch_sdk/types/v1/component_list_response.py +49 -0
- studyfetch_sdk/types/v1/component_retrieve_response.py +46 -0
- studyfetch_sdk/types/v1/component_update_params.py +12 -0
- studyfetch_sdk/types/v1/component_update_response.py +46 -0
- studyfetch_sdk/types/v1/embed/__init__.py +6 -0
- studyfetch_sdk/types/v1/embed/component_interact_params.py +14 -0
- studyfetch_sdk/types/v1/embed/component_retrieve_params.py +12 -0
- studyfetch_sdk/types/v1/embed_get_theme_params.py +12 -0
- studyfetch_sdk/types/v1/embed_verify_params.py +12 -0
- studyfetch_sdk/types/v1/explainer_handle_webhook_params.py +11 -0
- studyfetch_sdk/types/v1/flashcard_batch_process_params.py +36 -0
- studyfetch_sdk/types/v1/flashcard_batch_process_response.py +39 -0
- studyfetch_sdk/types/v1/flashcard_get_algorithm_info_response.py +37 -0
- studyfetch_sdk/types/v1/flashcard_get_all_params.py +23 -0
- studyfetch_sdk/types/v1/flashcard_get_due_params.py +19 -0
- studyfetch_sdk/types/v1/flashcard_get_stats_params.py +17 -0
- studyfetch_sdk/types/v1/flashcard_get_types_response.py +14 -0
- studyfetch_sdk/types/v1/flashcard_rate_params.py +23 -0
- studyfetch_sdk/types/v1/folder_create_params.py +17 -0
- studyfetch_sdk/types/v1/folder_list_params.py +14 -0
- studyfetch_sdk/types/v1/folder_update_params.py +17 -0
- studyfetch_sdk/types/v1/material_create_params.py +34 -0
- studyfetch_sdk/types/v1/material_create_response.py +62 -0
- studyfetch_sdk/types/v1/material_get_download_url_params.py +13 -0
- studyfetch_sdk/types/v1/material_list_params.py +14 -0
- studyfetch_sdk/types/v1/material_list_response.py +65 -0
- studyfetch_sdk/types/v1/material_retrieve_response.py +62 -0
- studyfetch_sdk/types/v1/materials/__init__.py +8 -0
- studyfetch_sdk/types/v1/materials/upload_upload_file_params.py +20 -0
- studyfetch_sdk/types/v1/materials/upload_upload_file_response.py +62 -0
- studyfetch_sdk/types/v1/materials/upload_upload_from_url_params.py +20 -0
- studyfetch_sdk/types/v1/materials/upload_upload_from_url_response.py +62 -0
- studyfetch_sdk/types/v1/organizations/__init__.py +3 -0
- studyfetch_sdk/types/v1/organizations/logo/__init__.py +3 -0
- studyfetch_sdk/types/v1/organizations/profile/__init__.py +3 -0
- studyfetch_sdk/types/v1/organizations/team/__init__.py +3 -0
- studyfetch_sdk/types/v1/scenario_create_params.py +11 -0
- studyfetch_sdk/types/v1/scenario_update_params.py +11 -0
- studyfetch_sdk/types/v1/scenarios/__init__.py +5 -0
- studyfetch_sdk/types/v1/scenarios/component_update_params.py +11 -0
- studyfetch_sdk/types/v1/scenarios/submissions/__init__.py +3 -0
- studyfetch_sdk/types/v1/test_create_params.py +20 -0
- studyfetch_sdk/types/v1/test_retake_params.py +14 -0
- studyfetch_sdk/types/v1/test_submit_answer_params.py +20 -0
- studyfetch_sdk/types/v1/test_submit_params.py +14 -0
- studyfetch_sdk/types/v1/tests/__init__.py +3 -0
- studyfetch_sdk/types/v1/upload/__init__.py +3 -0
- studyfetch_sdk/types/v1/usage_get_stats_params.py +23 -0
- studyfetch_sdk/types/v1/usage_get_summary_params.py +23 -0
- studyfetch_sdk/types/v1/usage_list_events_params.py +61 -0
- studyfetch_sdk/types/v1/usage_track_chat_params.py +54 -0
- studyfetch_sdk/types/v1/usage_track_event_params.py +128 -0
- studyfetch_sdk-0.1.0a1.dist-info/METADATA +453 -0
- studyfetch_sdk-0.1.0a1.dist-info/RECORD +165 -0
- studyfetch_sdk-0.1.0a1.dist-info/WHEEL +4 -0
- studyfetch_sdk-0.1.0a1.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,184 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
import httpx
|
6
|
+
|
7
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
8
|
+
from ...._compat import cached_property
|
9
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
10
|
+
from ...._response import (
|
11
|
+
to_raw_response_wrapper,
|
12
|
+
to_streamed_response_wrapper,
|
13
|
+
async_to_raw_response_wrapper,
|
14
|
+
async_to_streamed_response_wrapper,
|
15
|
+
)
|
16
|
+
from ...._base_client import make_request_options
|
17
|
+
|
18
|
+
__all__ = ["ThemeResource", "AsyncThemeResource"]
|
19
|
+
|
20
|
+
|
21
|
+
class ThemeResource(SyncAPIResource):
|
22
|
+
@cached_property
|
23
|
+
def with_raw_response(self) -> ThemeResourceWithRawResponse:
|
24
|
+
"""
|
25
|
+
This property can be used as a prefix for any HTTP method call to return
|
26
|
+
the raw response object instead of the parsed content.
|
27
|
+
|
28
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
29
|
+
"""
|
30
|
+
return ThemeResourceWithRawResponse(self)
|
31
|
+
|
32
|
+
@cached_property
|
33
|
+
def with_streaming_response(self) -> ThemeResourceWithStreamingResponse:
|
34
|
+
"""
|
35
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
36
|
+
|
37
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
38
|
+
"""
|
39
|
+
return ThemeResourceWithStreamingResponse(self)
|
40
|
+
|
41
|
+
def create(
|
42
|
+
self,
|
43
|
+
*,
|
44
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
45
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
46
|
+
extra_headers: Headers | None = None,
|
47
|
+
extra_query: Query | None = None,
|
48
|
+
extra_body: Body | None = None,
|
49
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
50
|
+
) -> None:
|
51
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
52
|
+
return self._put(
|
53
|
+
"/api/v1/organizations/theme",
|
54
|
+
options=make_request_options(
|
55
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
56
|
+
),
|
57
|
+
cast_to=NoneType,
|
58
|
+
)
|
59
|
+
|
60
|
+
def list(
|
61
|
+
self,
|
62
|
+
*,
|
63
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
64
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
65
|
+
extra_headers: Headers | None = None,
|
66
|
+
extra_query: Query | None = None,
|
67
|
+
extra_body: Body | None = None,
|
68
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
69
|
+
) -> None:
|
70
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
71
|
+
return self._get(
|
72
|
+
"/api/v1/organizations/theme",
|
73
|
+
options=make_request_options(
|
74
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
75
|
+
),
|
76
|
+
cast_to=NoneType,
|
77
|
+
)
|
78
|
+
|
79
|
+
|
80
|
+
class AsyncThemeResource(AsyncAPIResource):
|
81
|
+
@cached_property
|
82
|
+
def with_raw_response(self) -> AsyncThemeResourceWithRawResponse:
|
83
|
+
"""
|
84
|
+
This property can be used as a prefix for any HTTP method call to return
|
85
|
+
the raw response object instead of the parsed content.
|
86
|
+
|
87
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
88
|
+
"""
|
89
|
+
return AsyncThemeResourceWithRawResponse(self)
|
90
|
+
|
91
|
+
@cached_property
|
92
|
+
def with_streaming_response(self) -> AsyncThemeResourceWithStreamingResponse:
|
93
|
+
"""
|
94
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
95
|
+
|
96
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
97
|
+
"""
|
98
|
+
return AsyncThemeResourceWithStreamingResponse(self)
|
99
|
+
|
100
|
+
async def create(
|
101
|
+
self,
|
102
|
+
*,
|
103
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
104
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
105
|
+
extra_headers: Headers | None = None,
|
106
|
+
extra_query: Query | None = None,
|
107
|
+
extra_body: Body | None = None,
|
108
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
109
|
+
) -> None:
|
110
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
111
|
+
return await self._put(
|
112
|
+
"/api/v1/organizations/theme",
|
113
|
+
options=make_request_options(
|
114
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
115
|
+
),
|
116
|
+
cast_to=NoneType,
|
117
|
+
)
|
118
|
+
|
119
|
+
async def list(
|
120
|
+
self,
|
121
|
+
*,
|
122
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
123
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
124
|
+
extra_headers: Headers | None = None,
|
125
|
+
extra_query: Query | None = None,
|
126
|
+
extra_body: Body | None = None,
|
127
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
128
|
+
) -> None:
|
129
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
130
|
+
return await self._get(
|
131
|
+
"/api/v1/organizations/theme",
|
132
|
+
options=make_request_options(
|
133
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
134
|
+
),
|
135
|
+
cast_to=NoneType,
|
136
|
+
)
|
137
|
+
|
138
|
+
|
139
|
+
class ThemeResourceWithRawResponse:
|
140
|
+
def __init__(self, theme: ThemeResource) -> None:
|
141
|
+
self._theme = theme
|
142
|
+
|
143
|
+
self.create = to_raw_response_wrapper(
|
144
|
+
theme.create,
|
145
|
+
)
|
146
|
+
self.list = to_raw_response_wrapper(
|
147
|
+
theme.list,
|
148
|
+
)
|
149
|
+
|
150
|
+
|
151
|
+
class AsyncThemeResourceWithRawResponse:
|
152
|
+
def __init__(self, theme: AsyncThemeResource) -> None:
|
153
|
+
self._theme = theme
|
154
|
+
|
155
|
+
self.create = async_to_raw_response_wrapper(
|
156
|
+
theme.create,
|
157
|
+
)
|
158
|
+
self.list = async_to_raw_response_wrapper(
|
159
|
+
theme.list,
|
160
|
+
)
|
161
|
+
|
162
|
+
|
163
|
+
class ThemeResourceWithStreamingResponse:
|
164
|
+
def __init__(self, theme: ThemeResource) -> None:
|
165
|
+
self._theme = theme
|
166
|
+
|
167
|
+
self.create = to_streamed_response_wrapper(
|
168
|
+
theme.create,
|
169
|
+
)
|
170
|
+
self.list = to_streamed_response_wrapper(
|
171
|
+
theme.list,
|
172
|
+
)
|
173
|
+
|
174
|
+
|
175
|
+
class AsyncThemeResourceWithStreamingResponse:
|
176
|
+
def __init__(self, theme: AsyncThemeResource) -> None:
|
177
|
+
self._theme = theme
|
178
|
+
|
179
|
+
self.create = async_to_streamed_response_wrapper(
|
180
|
+
theme.create,
|
181
|
+
)
|
182
|
+
self.list = async_to_streamed_response_wrapper(
|
183
|
+
theme.list,
|
184
|
+
)
|
@@ -0,0 +1,160 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
import httpx
|
6
|
+
|
7
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
8
|
+
from ...._compat import cached_property
|
9
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
10
|
+
from ...._response import (
|
11
|
+
to_raw_response_wrapper,
|
12
|
+
to_streamed_response_wrapper,
|
13
|
+
async_to_raw_response_wrapper,
|
14
|
+
async_to_streamed_response_wrapper,
|
15
|
+
)
|
16
|
+
from ...._base_client import make_request_options
|
17
|
+
|
18
|
+
__all__ = ["UsageResource", "AsyncUsageResource"]
|
19
|
+
|
20
|
+
|
21
|
+
class UsageResource(SyncAPIResource):
|
22
|
+
@cached_property
|
23
|
+
def with_raw_response(self) -> UsageResourceWithRawResponse:
|
24
|
+
"""
|
25
|
+
This property can be used as a prefix for any HTTP method call to return
|
26
|
+
the raw response object instead of the parsed content.
|
27
|
+
|
28
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
29
|
+
"""
|
30
|
+
return UsageResourceWithRawResponse(self)
|
31
|
+
|
32
|
+
@cached_property
|
33
|
+
def with_streaming_response(self) -> UsageResourceWithStreamingResponse:
|
34
|
+
"""
|
35
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
36
|
+
|
37
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
38
|
+
"""
|
39
|
+
return UsageResourceWithStreamingResponse(self)
|
40
|
+
|
41
|
+
def list(
|
42
|
+
self,
|
43
|
+
id: str,
|
44
|
+
*,
|
45
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
46
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
47
|
+
extra_headers: Headers | None = None,
|
48
|
+
extra_query: Query | None = None,
|
49
|
+
extra_body: Body | None = None,
|
50
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
51
|
+
) -> None:
|
52
|
+
"""
|
53
|
+
Args:
|
54
|
+
extra_headers: Send extra headers
|
55
|
+
|
56
|
+
extra_query: Add additional query parameters to the request
|
57
|
+
|
58
|
+
extra_body: Add additional JSON properties to the request
|
59
|
+
|
60
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
61
|
+
"""
|
62
|
+
if not id:
|
63
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
64
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
65
|
+
return self._get(
|
66
|
+
f"/api/v1/organizations/{id}/usage",
|
67
|
+
options=make_request_options(
|
68
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
69
|
+
),
|
70
|
+
cast_to=NoneType,
|
71
|
+
)
|
72
|
+
|
73
|
+
|
74
|
+
class AsyncUsageResource(AsyncAPIResource):
|
75
|
+
@cached_property
|
76
|
+
def with_raw_response(self) -> AsyncUsageResourceWithRawResponse:
|
77
|
+
"""
|
78
|
+
This property can be used as a prefix for any HTTP method call to return
|
79
|
+
the raw response object instead of the parsed content.
|
80
|
+
|
81
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
82
|
+
"""
|
83
|
+
return AsyncUsageResourceWithRawResponse(self)
|
84
|
+
|
85
|
+
@cached_property
|
86
|
+
def with_streaming_response(self) -> AsyncUsageResourceWithStreamingResponse:
|
87
|
+
"""
|
88
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
89
|
+
|
90
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
91
|
+
"""
|
92
|
+
return AsyncUsageResourceWithStreamingResponse(self)
|
93
|
+
|
94
|
+
async def list(
|
95
|
+
self,
|
96
|
+
id: str,
|
97
|
+
*,
|
98
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
99
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
100
|
+
extra_headers: Headers | None = None,
|
101
|
+
extra_query: Query | None = None,
|
102
|
+
extra_body: Body | None = None,
|
103
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
104
|
+
) -> None:
|
105
|
+
"""
|
106
|
+
Args:
|
107
|
+
extra_headers: Send extra headers
|
108
|
+
|
109
|
+
extra_query: Add additional query parameters to the request
|
110
|
+
|
111
|
+
extra_body: Add additional JSON properties to the request
|
112
|
+
|
113
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
114
|
+
"""
|
115
|
+
if not id:
|
116
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
117
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
118
|
+
return await self._get(
|
119
|
+
f"/api/v1/organizations/{id}/usage",
|
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
|
+
|
127
|
+
class UsageResourceWithRawResponse:
|
128
|
+
def __init__(self, usage: UsageResource) -> None:
|
129
|
+
self._usage = usage
|
130
|
+
|
131
|
+
self.list = to_raw_response_wrapper(
|
132
|
+
usage.list,
|
133
|
+
)
|
134
|
+
|
135
|
+
|
136
|
+
class AsyncUsageResourceWithRawResponse:
|
137
|
+
def __init__(self, usage: AsyncUsageResource) -> None:
|
138
|
+
self._usage = usage
|
139
|
+
|
140
|
+
self.list = async_to_raw_response_wrapper(
|
141
|
+
usage.list,
|
142
|
+
)
|
143
|
+
|
144
|
+
|
145
|
+
class UsageResourceWithStreamingResponse:
|
146
|
+
def __init__(self, usage: UsageResource) -> None:
|
147
|
+
self._usage = usage
|
148
|
+
|
149
|
+
self.list = to_streamed_response_wrapper(
|
150
|
+
usage.list,
|
151
|
+
)
|
152
|
+
|
153
|
+
|
154
|
+
class AsyncUsageResourceWithStreamingResponse:
|
155
|
+
def __init__(self, usage: AsyncUsageResource) -> None:
|
156
|
+
self._usage = usage
|
157
|
+
|
158
|
+
self.list = async_to_streamed_response_wrapper(
|
159
|
+
usage.list,
|
160
|
+
)
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from .sessions import (
|
4
|
+
SessionsResource,
|
5
|
+
AsyncSessionsResource,
|
6
|
+
SessionsResourceWithRawResponse,
|
7
|
+
AsyncSessionsResourceWithRawResponse,
|
8
|
+
SessionsResourceWithStreamingResponse,
|
9
|
+
AsyncSessionsResourceWithStreamingResponse,
|
10
|
+
)
|
11
|
+
from .component import (
|
12
|
+
ComponentResource,
|
13
|
+
AsyncComponentResource,
|
14
|
+
ComponentResourceWithRawResponse,
|
15
|
+
AsyncComponentResourceWithRawResponse,
|
16
|
+
ComponentResourceWithStreamingResponse,
|
17
|
+
AsyncComponentResourceWithStreamingResponse,
|
18
|
+
)
|
19
|
+
from .scenarios import (
|
20
|
+
ScenariosResource,
|
21
|
+
AsyncScenariosResource,
|
22
|
+
ScenariosResourceWithRawResponse,
|
23
|
+
AsyncScenariosResourceWithRawResponse,
|
24
|
+
ScenariosResourceWithStreamingResponse,
|
25
|
+
AsyncScenariosResourceWithStreamingResponse,
|
26
|
+
)
|
27
|
+
from .submissions import (
|
28
|
+
SubmissionsResource,
|
29
|
+
AsyncSubmissionsResource,
|
30
|
+
SubmissionsResourceWithRawResponse,
|
31
|
+
AsyncSubmissionsResourceWithRawResponse,
|
32
|
+
SubmissionsResourceWithStreamingResponse,
|
33
|
+
AsyncSubmissionsResourceWithStreamingResponse,
|
34
|
+
)
|
35
|
+
|
36
|
+
__all__ = [
|
37
|
+
"ComponentResource",
|
38
|
+
"AsyncComponentResource",
|
39
|
+
"ComponentResourceWithRawResponse",
|
40
|
+
"AsyncComponentResourceWithRawResponse",
|
41
|
+
"ComponentResourceWithStreamingResponse",
|
42
|
+
"AsyncComponentResourceWithStreamingResponse",
|
43
|
+
"SessionsResource",
|
44
|
+
"AsyncSessionsResource",
|
45
|
+
"SessionsResourceWithRawResponse",
|
46
|
+
"AsyncSessionsResourceWithRawResponse",
|
47
|
+
"SessionsResourceWithStreamingResponse",
|
48
|
+
"AsyncSessionsResourceWithStreamingResponse",
|
49
|
+
"SubmissionsResource",
|
50
|
+
"AsyncSubmissionsResource",
|
51
|
+
"SubmissionsResourceWithRawResponse",
|
52
|
+
"AsyncSubmissionsResourceWithRawResponse",
|
53
|
+
"SubmissionsResourceWithStreamingResponse",
|
54
|
+
"AsyncSubmissionsResourceWithStreamingResponse",
|
55
|
+
"ScenariosResource",
|
56
|
+
"AsyncScenariosResource",
|
57
|
+
"ScenariosResourceWithRawResponse",
|
58
|
+
"AsyncScenariosResourceWithRawResponse",
|
59
|
+
"ScenariosResourceWithStreamingResponse",
|
60
|
+
"AsyncScenariosResourceWithStreamingResponse",
|
61
|
+
]
|