studyfetch-sdk 0.1.0a2__py3-none-any.whl → 0.1.0a3__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 +0 -14
- studyfetch_sdk/resources/v1/auth/__init__.py +0 -28
- studyfetch_sdk/resources/v1/auth/auth.py +0 -504
- studyfetch_sdk/resources/v1/auth/number_2fa.py +1 -294
- studyfetch_sdk/resources/v1/usage.py +1 -593
- studyfetch_sdk/resources/v1/v1.py +0 -32
- studyfetch_sdk/types/v1/__init__.py +0 -5
- studyfetch_sdk/types/v1/auth/__init__.py +0 -8
- {studyfetch_sdk-0.1.0a2.dist-info → studyfetch_sdk-0.1.0a3.dist-info}/METADATA +11 -35
- {studyfetch_sdk-0.1.0a2.dist-info → studyfetch_sdk-0.1.0a3.dist-info}/RECORD +13 -41
- studyfetch_sdk/resources/v1/auth/login.py +0 -374
- studyfetch_sdk/resources/v1/auth/organization_invites.py +0 -160
- studyfetch_sdk/resources/v1/organizations/__init__.py +0 -103
- studyfetch_sdk/resources/v1/organizations/api_keys.py +0 -260
- studyfetch_sdk/resources/v1/organizations/logo/__init__.py +0 -33
- studyfetch_sdk/resources/v1/organizations/logo/logo.py +0 -166
- studyfetch_sdk/resources/v1/organizations/logo/upload.py +0 -184
- studyfetch_sdk/resources/v1/organizations/organizations.py +0 -428
- studyfetch_sdk/resources/v1/organizations/profile/__init__.py +0 -47
- studyfetch_sdk/resources/v1/organizations/profile/models.py +0 -134
- studyfetch_sdk/resources/v1/organizations/profile/profile.py +0 -248
- studyfetch_sdk/resources/v1/organizations/profile/team.py +0 -462
- studyfetch_sdk/resources/v1/organizations/team/__init__.py +0 -33
- studyfetch_sdk/resources/v1/organizations/team/invite.py +0 -236
- studyfetch_sdk/resources/v1/organizations/team/team.py +0 -564
- studyfetch_sdk/resources/v1/organizations/theme.py +0 -184
- studyfetch_sdk/resources/v1/organizations/usage.py +0 -210
- studyfetch_sdk/types/v1/auth/login_authenticate_params.py +0 -15
- studyfetch_sdk/types/v1/auth/login_verify_2fa_params.py +0 -15
- studyfetch_sdk/types/v1/auth/login_verify_backup_code_params.py +0 -17
- studyfetch_sdk/types/v1/auth/number_2fa_disable_params.py +0 -12
- studyfetch_sdk/types/v1/auth/number_2fa_enable_params.py +0 -12
- studyfetch_sdk/types/v1/auth/number_2fa_regenerate_backup_codes_params.py +0 -12
- studyfetch_sdk/types/v1/auth_register_new_user_params.py +0 -23
- studyfetch_sdk/types/v1/auth_request_password_reset_params.py +0 -12
- studyfetch_sdk/types/v1/auth_reset_password_params.py +0 -17
- studyfetch_sdk/types/v1/usage_track_chat_params.py +0 -54
- studyfetch_sdk/types/v1/usage_track_event_params.py +0 -128
- {studyfetch_sdk-0.1.0a2.dist-info → studyfetch_sdk-0.1.0a3.dist-info}/WHEEL +0 -0
- {studyfetch_sdk-0.1.0a2.dist-info → studyfetch_sdk-0.1.0a3.dist-info}/licenses/LICENSE +0 -0
@@ -1,260 +0,0 @@
|
|
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__ = ["APIKeysResource", "AsyncAPIKeysResource"]
|
19
|
-
|
20
|
-
|
21
|
-
class APIKeysResource(SyncAPIResource):
|
22
|
-
@cached_property
|
23
|
-
def with_raw_response(self) -> APIKeysResourceWithRawResponse:
|
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 APIKeysResourceWithRawResponse(self)
|
31
|
-
|
32
|
-
@cached_property
|
33
|
-
def with_streaming_response(self) -> APIKeysResourceWithStreamingResponse:
|
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 APIKeysResourceWithStreamingResponse(self)
|
40
|
-
|
41
|
-
def delete(
|
42
|
-
self,
|
43
|
-
key_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 key_id:
|
63
|
-
raise ValueError(f"Expected a non-empty value for `key_id` but received {key_id!r}")
|
64
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
65
|
-
return self._delete(
|
66
|
-
f"/api/v1/organizations/api-keys/{key_id}",
|
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
|
-
def api_keys(
|
74
|
-
self,
|
75
|
-
*,
|
76
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
77
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
78
|
-
extra_headers: Headers | None = None,
|
79
|
-
extra_query: Query | None = None,
|
80
|
-
extra_body: Body | None = None,
|
81
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
82
|
-
) -> None:
|
83
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
84
|
-
return self._post(
|
85
|
-
"/api/v1/organizations/api-keys",
|
86
|
-
options=make_request_options(
|
87
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
88
|
-
),
|
89
|
-
cast_to=NoneType,
|
90
|
-
)
|
91
|
-
|
92
|
-
def retrieve_api_keys(
|
93
|
-
self,
|
94
|
-
*,
|
95
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
96
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
97
|
-
extra_headers: Headers | None = None,
|
98
|
-
extra_query: Query | None = None,
|
99
|
-
extra_body: Body | None = None,
|
100
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
101
|
-
) -> None:
|
102
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
103
|
-
return self._get(
|
104
|
-
"/api/v1/organizations/api-keys",
|
105
|
-
options=make_request_options(
|
106
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
107
|
-
),
|
108
|
-
cast_to=NoneType,
|
109
|
-
)
|
110
|
-
|
111
|
-
|
112
|
-
class AsyncAPIKeysResource(AsyncAPIResource):
|
113
|
-
@cached_property
|
114
|
-
def with_raw_response(self) -> AsyncAPIKeysResourceWithRawResponse:
|
115
|
-
"""
|
116
|
-
This property can be used as a prefix for any HTTP method call to return
|
117
|
-
the raw response object instead of the parsed content.
|
118
|
-
|
119
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
120
|
-
"""
|
121
|
-
return AsyncAPIKeysResourceWithRawResponse(self)
|
122
|
-
|
123
|
-
@cached_property
|
124
|
-
def with_streaming_response(self) -> AsyncAPIKeysResourceWithStreamingResponse:
|
125
|
-
"""
|
126
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
127
|
-
|
128
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
129
|
-
"""
|
130
|
-
return AsyncAPIKeysResourceWithStreamingResponse(self)
|
131
|
-
|
132
|
-
async def delete(
|
133
|
-
self,
|
134
|
-
key_id: str,
|
135
|
-
*,
|
136
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
137
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
138
|
-
extra_headers: Headers | None = None,
|
139
|
-
extra_query: Query | None = None,
|
140
|
-
extra_body: Body | None = None,
|
141
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
142
|
-
) -> None:
|
143
|
-
"""
|
144
|
-
Args:
|
145
|
-
extra_headers: Send extra headers
|
146
|
-
|
147
|
-
extra_query: Add additional query parameters to the request
|
148
|
-
|
149
|
-
extra_body: Add additional JSON properties to the request
|
150
|
-
|
151
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
152
|
-
"""
|
153
|
-
if not key_id:
|
154
|
-
raise ValueError(f"Expected a non-empty value for `key_id` but received {key_id!r}")
|
155
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
156
|
-
return await self._delete(
|
157
|
-
f"/api/v1/organizations/api-keys/{key_id}",
|
158
|
-
options=make_request_options(
|
159
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
160
|
-
),
|
161
|
-
cast_to=NoneType,
|
162
|
-
)
|
163
|
-
|
164
|
-
async def api_keys(
|
165
|
-
self,
|
166
|
-
*,
|
167
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
168
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
169
|
-
extra_headers: Headers | None = None,
|
170
|
-
extra_query: Query | None = None,
|
171
|
-
extra_body: Body | None = None,
|
172
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
173
|
-
) -> None:
|
174
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
175
|
-
return await self._post(
|
176
|
-
"/api/v1/organizations/api-keys",
|
177
|
-
options=make_request_options(
|
178
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
179
|
-
),
|
180
|
-
cast_to=NoneType,
|
181
|
-
)
|
182
|
-
|
183
|
-
async def retrieve_api_keys(
|
184
|
-
self,
|
185
|
-
*,
|
186
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
187
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
188
|
-
extra_headers: Headers | None = None,
|
189
|
-
extra_query: Query | None = None,
|
190
|
-
extra_body: Body | None = None,
|
191
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
192
|
-
) -> None:
|
193
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
194
|
-
return await self._get(
|
195
|
-
"/api/v1/organizations/api-keys",
|
196
|
-
options=make_request_options(
|
197
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
198
|
-
),
|
199
|
-
cast_to=NoneType,
|
200
|
-
)
|
201
|
-
|
202
|
-
|
203
|
-
class APIKeysResourceWithRawResponse:
|
204
|
-
def __init__(self, api_keys: APIKeysResource) -> None:
|
205
|
-
self._api_keys = api_keys
|
206
|
-
|
207
|
-
self.delete = to_raw_response_wrapper(
|
208
|
-
api_keys.delete,
|
209
|
-
)
|
210
|
-
self.api_keys = to_raw_response_wrapper(
|
211
|
-
api_keys.api_keys,
|
212
|
-
)
|
213
|
-
self.retrieve_api_keys = to_raw_response_wrapper(
|
214
|
-
api_keys.retrieve_api_keys,
|
215
|
-
)
|
216
|
-
|
217
|
-
|
218
|
-
class AsyncAPIKeysResourceWithRawResponse:
|
219
|
-
def __init__(self, api_keys: AsyncAPIKeysResource) -> None:
|
220
|
-
self._api_keys = api_keys
|
221
|
-
|
222
|
-
self.delete = async_to_raw_response_wrapper(
|
223
|
-
api_keys.delete,
|
224
|
-
)
|
225
|
-
self.api_keys = async_to_raw_response_wrapper(
|
226
|
-
api_keys.api_keys,
|
227
|
-
)
|
228
|
-
self.retrieve_api_keys = async_to_raw_response_wrapper(
|
229
|
-
api_keys.retrieve_api_keys,
|
230
|
-
)
|
231
|
-
|
232
|
-
|
233
|
-
class APIKeysResourceWithStreamingResponse:
|
234
|
-
def __init__(self, api_keys: APIKeysResource) -> None:
|
235
|
-
self._api_keys = api_keys
|
236
|
-
|
237
|
-
self.delete = to_streamed_response_wrapper(
|
238
|
-
api_keys.delete,
|
239
|
-
)
|
240
|
-
self.api_keys = to_streamed_response_wrapper(
|
241
|
-
api_keys.api_keys,
|
242
|
-
)
|
243
|
-
self.retrieve_api_keys = to_streamed_response_wrapper(
|
244
|
-
api_keys.retrieve_api_keys,
|
245
|
-
)
|
246
|
-
|
247
|
-
|
248
|
-
class AsyncAPIKeysResourceWithStreamingResponse:
|
249
|
-
def __init__(self, api_keys: AsyncAPIKeysResource) -> None:
|
250
|
-
self._api_keys = api_keys
|
251
|
-
|
252
|
-
self.delete = async_to_streamed_response_wrapper(
|
253
|
-
api_keys.delete,
|
254
|
-
)
|
255
|
-
self.api_keys = async_to_streamed_response_wrapper(
|
256
|
-
api_keys.api_keys,
|
257
|
-
)
|
258
|
-
self.retrieve_api_keys = async_to_streamed_response_wrapper(
|
259
|
-
api_keys.retrieve_api_keys,
|
260
|
-
)
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
-
|
3
|
-
from .logo import (
|
4
|
-
LogoResource,
|
5
|
-
AsyncLogoResource,
|
6
|
-
LogoResourceWithRawResponse,
|
7
|
-
AsyncLogoResourceWithRawResponse,
|
8
|
-
LogoResourceWithStreamingResponse,
|
9
|
-
AsyncLogoResourceWithStreamingResponse,
|
10
|
-
)
|
11
|
-
from .upload import (
|
12
|
-
UploadResource,
|
13
|
-
AsyncUploadResource,
|
14
|
-
UploadResourceWithRawResponse,
|
15
|
-
AsyncUploadResourceWithRawResponse,
|
16
|
-
UploadResourceWithStreamingResponse,
|
17
|
-
AsyncUploadResourceWithStreamingResponse,
|
18
|
-
)
|
19
|
-
|
20
|
-
__all__ = [
|
21
|
-
"UploadResource",
|
22
|
-
"AsyncUploadResource",
|
23
|
-
"UploadResourceWithRawResponse",
|
24
|
-
"AsyncUploadResourceWithRawResponse",
|
25
|
-
"UploadResourceWithStreamingResponse",
|
26
|
-
"AsyncUploadResourceWithStreamingResponse",
|
27
|
-
"LogoResource",
|
28
|
-
"AsyncLogoResource",
|
29
|
-
"LogoResourceWithRawResponse",
|
30
|
-
"AsyncLogoResourceWithRawResponse",
|
31
|
-
"LogoResourceWithStreamingResponse",
|
32
|
-
"AsyncLogoResourceWithStreamingResponse",
|
33
|
-
]
|
@@ -1,166 +0,0 @@
|
|
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 .upload import (
|
8
|
-
UploadResource,
|
9
|
-
AsyncUploadResource,
|
10
|
-
UploadResourceWithRawResponse,
|
11
|
-
AsyncUploadResourceWithRawResponse,
|
12
|
-
UploadResourceWithStreamingResponse,
|
13
|
-
AsyncUploadResourceWithStreamingResponse,
|
14
|
-
)
|
15
|
-
from ....._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
16
|
-
from ....._compat import cached_property
|
17
|
-
from ....._resource import SyncAPIResource, AsyncAPIResource
|
18
|
-
from ....._response import (
|
19
|
-
to_raw_response_wrapper,
|
20
|
-
to_streamed_response_wrapper,
|
21
|
-
async_to_raw_response_wrapper,
|
22
|
-
async_to_streamed_response_wrapper,
|
23
|
-
)
|
24
|
-
from ....._base_client import make_request_options
|
25
|
-
|
26
|
-
__all__ = ["LogoResource", "AsyncLogoResource"]
|
27
|
-
|
28
|
-
|
29
|
-
class LogoResource(SyncAPIResource):
|
30
|
-
@cached_property
|
31
|
-
def upload(self) -> UploadResource:
|
32
|
-
return UploadResource(self._client)
|
33
|
-
|
34
|
-
@cached_property
|
35
|
-
def with_raw_response(self) -> LogoResourceWithRawResponse:
|
36
|
-
"""
|
37
|
-
This property can be used as a prefix for any HTTP method call to return
|
38
|
-
the raw response object instead of the parsed content.
|
39
|
-
|
40
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
41
|
-
"""
|
42
|
-
return LogoResourceWithRawResponse(self)
|
43
|
-
|
44
|
-
@cached_property
|
45
|
-
def with_streaming_response(self) -> LogoResourceWithStreamingResponse:
|
46
|
-
"""
|
47
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
48
|
-
|
49
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
50
|
-
"""
|
51
|
-
return LogoResourceWithStreamingResponse(self)
|
52
|
-
|
53
|
-
def delete_all(
|
54
|
-
self,
|
55
|
-
*,
|
56
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
57
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
58
|
-
extra_headers: Headers | None = None,
|
59
|
-
extra_query: Query | None = None,
|
60
|
-
extra_body: Body | None = None,
|
61
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
62
|
-
) -> None:
|
63
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
64
|
-
return self._delete(
|
65
|
-
"/api/v1/organizations/logo",
|
66
|
-
options=make_request_options(
|
67
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
68
|
-
),
|
69
|
-
cast_to=NoneType,
|
70
|
-
)
|
71
|
-
|
72
|
-
|
73
|
-
class AsyncLogoResource(AsyncAPIResource):
|
74
|
-
@cached_property
|
75
|
-
def upload(self) -> AsyncUploadResource:
|
76
|
-
return AsyncUploadResource(self._client)
|
77
|
-
|
78
|
-
@cached_property
|
79
|
-
def with_raw_response(self) -> AsyncLogoResourceWithRawResponse:
|
80
|
-
"""
|
81
|
-
This property can be used as a prefix for any HTTP method call to return
|
82
|
-
the raw response object instead of the parsed content.
|
83
|
-
|
84
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
85
|
-
"""
|
86
|
-
return AsyncLogoResourceWithRawResponse(self)
|
87
|
-
|
88
|
-
@cached_property
|
89
|
-
def with_streaming_response(self) -> AsyncLogoResourceWithStreamingResponse:
|
90
|
-
"""
|
91
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
92
|
-
|
93
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
94
|
-
"""
|
95
|
-
return AsyncLogoResourceWithStreamingResponse(self)
|
96
|
-
|
97
|
-
async def delete_all(
|
98
|
-
self,
|
99
|
-
*,
|
100
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
101
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
102
|
-
extra_headers: Headers | None = None,
|
103
|
-
extra_query: Query | None = None,
|
104
|
-
extra_body: Body | None = None,
|
105
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
106
|
-
) -> None:
|
107
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
108
|
-
return await self._delete(
|
109
|
-
"/api/v1/organizations/logo",
|
110
|
-
options=make_request_options(
|
111
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
112
|
-
),
|
113
|
-
cast_to=NoneType,
|
114
|
-
)
|
115
|
-
|
116
|
-
|
117
|
-
class LogoResourceWithRawResponse:
|
118
|
-
def __init__(self, logo: LogoResource) -> None:
|
119
|
-
self._logo = logo
|
120
|
-
|
121
|
-
self.delete_all = to_raw_response_wrapper(
|
122
|
-
logo.delete_all,
|
123
|
-
)
|
124
|
-
|
125
|
-
@cached_property
|
126
|
-
def upload(self) -> UploadResourceWithRawResponse:
|
127
|
-
return UploadResourceWithRawResponse(self._logo.upload)
|
128
|
-
|
129
|
-
|
130
|
-
class AsyncLogoResourceWithRawResponse:
|
131
|
-
def __init__(self, logo: AsyncLogoResource) -> None:
|
132
|
-
self._logo = logo
|
133
|
-
|
134
|
-
self.delete_all = async_to_raw_response_wrapper(
|
135
|
-
logo.delete_all,
|
136
|
-
)
|
137
|
-
|
138
|
-
@cached_property
|
139
|
-
def upload(self) -> AsyncUploadResourceWithRawResponse:
|
140
|
-
return AsyncUploadResourceWithRawResponse(self._logo.upload)
|
141
|
-
|
142
|
-
|
143
|
-
class LogoResourceWithStreamingResponse:
|
144
|
-
def __init__(self, logo: LogoResource) -> None:
|
145
|
-
self._logo = logo
|
146
|
-
|
147
|
-
self.delete_all = to_streamed_response_wrapper(
|
148
|
-
logo.delete_all,
|
149
|
-
)
|
150
|
-
|
151
|
-
@cached_property
|
152
|
-
def upload(self) -> UploadResourceWithStreamingResponse:
|
153
|
-
return UploadResourceWithStreamingResponse(self._logo.upload)
|
154
|
-
|
155
|
-
|
156
|
-
class AsyncLogoResourceWithStreamingResponse:
|
157
|
-
def __init__(self, logo: AsyncLogoResource) -> None:
|
158
|
-
self._logo = logo
|
159
|
-
|
160
|
-
self.delete_all = async_to_streamed_response_wrapper(
|
161
|
-
logo.delete_all,
|
162
|
-
)
|
163
|
-
|
164
|
-
@cached_property
|
165
|
-
def upload(self) -> AsyncUploadResourceWithStreamingResponse:
|
166
|
-
return AsyncUploadResourceWithStreamingResponse(self._logo.upload)
|
@@ -1,184 +0,0 @@
|
|
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__ = ["UploadResource", "AsyncUploadResource"]
|
19
|
-
|
20
|
-
|
21
|
-
class UploadResource(SyncAPIResource):
|
22
|
-
@cached_property
|
23
|
-
def with_raw_response(self) -> UploadResourceWithRawResponse:
|
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 UploadResourceWithRawResponse(self)
|
31
|
-
|
32
|
-
@cached_property
|
33
|
-
def with_streaming_response(self) -> UploadResourceWithStreamingResponse:
|
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 UploadResourceWithStreamingResponse(self)
|
40
|
-
|
41
|
-
def complete(
|
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._post(
|
53
|
-
"/api/v1/organizations/logo/upload/complete",
|
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 presigned_url(
|
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._post(
|
72
|
-
"/api/v1/organizations/logo/upload/presigned-url",
|
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 AsyncUploadResource(AsyncAPIResource):
|
81
|
-
@cached_property
|
82
|
-
def with_raw_response(self) -> AsyncUploadResourceWithRawResponse:
|
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 AsyncUploadResourceWithRawResponse(self)
|
90
|
-
|
91
|
-
@cached_property
|
92
|
-
def with_streaming_response(self) -> AsyncUploadResourceWithStreamingResponse:
|
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 AsyncUploadResourceWithStreamingResponse(self)
|
99
|
-
|
100
|
-
async def complete(
|
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._post(
|
112
|
-
"/api/v1/organizations/logo/upload/complete",
|
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 presigned_url(
|
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._post(
|
131
|
-
"/api/v1/organizations/logo/upload/presigned-url",
|
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 UploadResourceWithRawResponse:
|
140
|
-
def __init__(self, upload: UploadResource) -> None:
|
141
|
-
self._upload = upload
|
142
|
-
|
143
|
-
self.complete = to_raw_response_wrapper(
|
144
|
-
upload.complete,
|
145
|
-
)
|
146
|
-
self.presigned_url = to_raw_response_wrapper(
|
147
|
-
upload.presigned_url,
|
148
|
-
)
|
149
|
-
|
150
|
-
|
151
|
-
class AsyncUploadResourceWithRawResponse:
|
152
|
-
def __init__(self, upload: AsyncUploadResource) -> None:
|
153
|
-
self._upload = upload
|
154
|
-
|
155
|
-
self.complete = async_to_raw_response_wrapper(
|
156
|
-
upload.complete,
|
157
|
-
)
|
158
|
-
self.presigned_url = async_to_raw_response_wrapper(
|
159
|
-
upload.presigned_url,
|
160
|
-
)
|
161
|
-
|
162
|
-
|
163
|
-
class UploadResourceWithStreamingResponse:
|
164
|
-
def __init__(self, upload: UploadResource) -> None:
|
165
|
-
self._upload = upload
|
166
|
-
|
167
|
-
self.complete = to_streamed_response_wrapper(
|
168
|
-
upload.complete,
|
169
|
-
)
|
170
|
-
self.presigned_url = to_streamed_response_wrapper(
|
171
|
-
upload.presigned_url,
|
172
|
-
)
|
173
|
-
|
174
|
-
|
175
|
-
class AsyncUploadResourceWithStreamingResponse:
|
176
|
-
def __init__(self, upload: AsyncUploadResource) -> None:
|
177
|
-
self._upload = upload
|
178
|
-
|
179
|
-
self.complete = async_to_streamed_response_wrapper(
|
180
|
-
upload.complete,
|
181
|
-
)
|
182
|
-
self.presigned_url = async_to_streamed_response_wrapper(
|
183
|
-
upload.presigned_url,
|
184
|
-
)
|