studyfetch-sdk 0.1.0a6__py3-none-any.whl → 0.1.0a8__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.
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "studyfetch_sdk"
4
- __version__ = "0.1.0-alpha.6" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.8" # x-release-please-version
@@ -8,14 +8,6 @@ from .v1 import (
8
8
  V1ResourceWithStreamingResponse,
9
9
  AsyncV1ResourceWithStreamingResponse,
10
10
  )
11
- from .auth import (
12
- AuthResource,
13
- AsyncAuthResource,
14
- AuthResourceWithRawResponse,
15
- AsyncAuthResourceWithRawResponse,
16
- AuthResourceWithStreamingResponse,
17
- AsyncAuthResourceWithStreamingResponse,
18
- )
19
11
  from .chat import (
20
12
  ChatResource,
21
13
  AsyncChatResource,
@@ -114,12 +106,6 @@ from .audio_recaps import (
114
106
  )
115
107
 
116
108
  __all__ = [
117
- "AuthResource",
118
- "AsyncAuthResource",
119
- "AuthResourceWithRawResponse",
120
- "AsyncAuthResourceWithRawResponse",
121
- "AuthResourceWithStreamingResponse",
122
- "AsyncAuthResourceWithStreamingResponse",
123
109
  "MaterialsResource",
124
110
  "AsyncMaterialsResource",
125
111
  "MaterialsResourceWithRawResponse",
@@ -19,14 +19,6 @@ from .folders import (
19
19
  AsyncFoldersResourceWithStreamingResponse,
20
20
  )
21
21
  from ..._compat import cached_property
22
- from .auth.auth import (
23
- AuthResource,
24
- AsyncAuthResource,
25
- AuthResourceWithRawResponse,
26
- AsyncAuthResourceWithRawResponse,
27
- AuthResourceWithStreamingResponse,
28
- AsyncAuthResourceWithStreamingResponse,
29
- )
30
22
  from .chat.chat import (
31
23
  ChatResource,
32
24
  AsyncChatResource,
@@ -113,10 +105,6 @@ __all__ = ["V1Resource", "AsyncV1Resource"]
113
105
 
114
106
 
115
107
  class V1Resource(SyncAPIResource):
116
- @cached_property
117
- def auth(self) -> AuthResource:
118
- return AuthResource(self._client)
119
-
120
108
  @cached_property
121
109
  def materials(self) -> MaterialsResource:
122
110
  return MaterialsResource(self._client)
@@ -186,10 +174,6 @@ class V1Resource(SyncAPIResource):
186
174
 
187
175
 
188
176
  class AsyncV1Resource(AsyncAPIResource):
189
- @cached_property
190
- def auth(self) -> AsyncAuthResource:
191
- return AsyncAuthResource(self._client)
192
-
193
177
  @cached_property
194
178
  def materials(self) -> AsyncMaterialsResource:
195
179
  return AsyncMaterialsResource(self._client)
@@ -262,10 +246,6 @@ class V1ResourceWithRawResponse:
262
246
  def __init__(self, v1: V1Resource) -> None:
263
247
  self._v1 = v1
264
248
 
265
- @cached_property
266
- def auth(self) -> AuthResourceWithRawResponse:
267
- return AuthResourceWithRawResponse(self._v1.auth)
268
-
269
249
  @cached_property
270
250
  def materials(self) -> MaterialsResourceWithRawResponse:
271
251
  return MaterialsResourceWithRawResponse(self._v1.materials)
@@ -319,10 +299,6 @@ class AsyncV1ResourceWithRawResponse:
319
299
  def __init__(self, v1: AsyncV1Resource) -> None:
320
300
  self._v1 = v1
321
301
 
322
- @cached_property
323
- def auth(self) -> AsyncAuthResourceWithRawResponse:
324
- return AsyncAuthResourceWithRawResponse(self._v1.auth)
325
-
326
302
  @cached_property
327
303
  def materials(self) -> AsyncMaterialsResourceWithRawResponse:
328
304
  return AsyncMaterialsResourceWithRawResponse(self._v1.materials)
@@ -376,10 +352,6 @@ class V1ResourceWithStreamingResponse:
376
352
  def __init__(self, v1: V1Resource) -> None:
377
353
  self._v1 = v1
378
354
 
379
- @cached_property
380
- def auth(self) -> AuthResourceWithStreamingResponse:
381
- return AuthResourceWithStreamingResponse(self._v1.auth)
382
-
383
355
  @cached_property
384
356
  def materials(self) -> MaterialsResourceWithStreamingResponse:
385
357
  return MaterialsResourceWithStreamingResponse(self._v1.materials)
@@ -433,10 +405,6 @@ class AsyncV1ResourceWithStreamingResponse:
433
405
  def __init__(self, v1: AsyncV1Resource) -> None:
434
406
  self._v1 = v1
435
407
 
436
- @cached_property
437
- def auth(self) -> AsyncAuthResourceWithStreamingResponse:
438
- return AsyncAuthResourceWithStreamingResponse(self._v1.auth)
439
-
440
408
  @cached_property
441
409
  def materials(self) -> AsyncMaterialsResourceWithStreamingResponse:
442
410
  return AsyncMaterialsResourceWithStreamingResponse(self._v1.materials)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: studyfetch_sdk
3
- Version: 0.1.0a6
3
+ Version: 0.1.0a8
4
4
  Summary: The official Python library for the studyfetch-sdk API
5
5
  Project-URL: Homepage, https://github.com/GoStudyFetchGo/studyfetch-sdk-python
6
6
  Project-URL: Repository, https://github.com/GoStudyFetchGo/studyfetch-sdk-python
@@ -67,9 +67,7 @@ client = StudyfetchSDK(
67
67
  api_key=os.environ.get("STUDYFETCH_SDK_API_KEY"), # This is the default and can be omitted
68
68
  )
69
69
 
70
- client.v1.auth.number_2fa.send_code(
71
- email="user@example.com",
72
- )
70
+ materials = client.v1.materials.list()
73
71
  ```
74
72
 
75
73
  While you can provide an `api_key` keyword argument,
@@ -92,9 +90,7 @@ client = AsyncStudyfetchSDK(
92
90
 
93
91
 
94
92
  async def main() -> None:
95
- await client.v1.auth.number_2fa.send_code(
96
- email="user@example.com",
97
- )
93
+ materials = await client.v1.materials.list()
98
94
 
99
95
 
100
96
  asyncio.run(main())
@@ -126,9 +122,7 @@ async def main() -> None:
126
122
  api_key="My API Key",
127
123
  http_client=DefaultAioHttpClient(),
128
124
  ) as client:
129
- await client.v1.auth.number_2fa.send_code(
130
- email="user@example.com",
131
- )
125
+ materials = await client.v1.materials.list()
132
126
 
133
127
 
134
128
  asyncio.run(main())
@@ -193,9 +187,7 @@ from studyfetch_sdk import StudyfetchSDK
193
187
  client = StudyfetchSDK()
194
188
 
195
189
  try:
196
- client.v1.auth.number_2fa.send_code(
197
- email="user@example.com",
198
- )
190
+ client.v1.materials.list()
199
191
  except studyfetch_sdk.APIConnectionError as e:
200
192
  print("The server could not be reached")
201
193
  print(e.__cause__) # an underlying Exception, likely raised within httpx.
@@ -238,9 +230,7 @@ client = StudyfetchSDK(
238
230
  )
239
231
 
240
232
  # Or, configure per-request:
241
- client.with_options(max_retries=5).v1.auth.number_2fa.send_code(
242
- email="user@example.com",
243
- )
233
+ client.with_options(max_retries=5).v1.materials.list()
244
234
  ```
245
235
 
246
236
  ### Timeouts
@@ -263,9 +253,7 @@ client = StudyfetchSDK(
263
253
  )
264
254
 
265
255
  # Override per-request:
266
- client.with_options(timeout=5.0).v1.auth.number_2fa.send_code(
267
- email="user@example.com",
268
- )
256
+ client.with_options(timeout=5.0).v1.materials.list()
269
257
  ```
270
258
 
271
259
  On timeout, an `APITimeoutError` is thrown.
@@ -306,13 +294,11 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
306
294
  from studyfetch_sdk import StudyfetchSDK
307
295
 
308
296
  client = StudyfetchSDK()
309
- response = client.v1.auth.number_2fa.with_raw_response.send_code(
310
- email="user@example.com",
311
- )
297
+ response = client.v1.materials.with_raw_response.list()
312
298
  print(response.headers.get('X-My-Header'))
313
299
 
314
- number_2fa = response.parse() # get the object that `v1.auth.number_2fa.send_code()` would have returned
315
- print(number_2fa)
300
+ material = response.parse() # get the object that `v1.materials.list()` would have returned
301
+ print(material)
316
302
  ```
317
303
 
318
304
  These methods return an [`APIResponse`](https://github.com/GoStudyFetchGo/studyfetch-sdk-python/tree/main/src/studyfetch_sdk/_response.py) object.
@@ -326,9 +312,7 @@ The above interface eagerly reads the full response body when you make the reque
326
312
  To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
327
313
 
328
314
  ```python
329
- with client.v1.auth.number_2fa.with_streaming_response.send_code(
330
- email="user@example.com",
331
- ) as response:
315
+ with client.v1.materials.with_streaming_response.list() as response:
332
316
  print(response.headers.get("X-My-Header"))
333
317
 
334
318
  for line in response.iter_lines():
@@ -11,7 +11,7 @@ studyfetch_sdk/_resource.py,sha256=y0aoAqMIYwTAwStuxbpO8XpTPnrSNQQ_ZcgiH5xcntg,1
11
11
  studyfetch_sdk/_response.py,sha256=6ph8tSkqF5pNbTo_2Zhizhq2O-Eb67TcksHwyg3aXdc,28864
12
12
  studyfetch_sdk/_streaming.py,sha256=HZoENuPVzWhBn24eH3lnMCvRbWN0EPwvhWYfdlJfw0A,10128
13
13
  studyfetch_sdk/_types.py,sha256=6nvqHGarRGuhs_FL8tJ8sGXXD8XWajNynT2K78GxRUI,6205
14
- studyfetch_sdk/_version.py,sha256=ELm7t_CV4x0QoVydh7-cy-IfaKxJP6EAOooEM0BRi6Q,174
14
+ studyfetch_sdk/_version.py,sha256=Vf6gzaBS9CUgMitt7McNjZ6uRx010I7u4yd1TX0pF4w,174
15
15
  studyfetch_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  studyfetch_sdk/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
17
17
  studyfetch_sdk/_utils/_logs.py,sha256=EoZgOiIkpf2WB_0Ts0Ti7G3o_25v7IsPf_q-yEU6sbY,798
@@ -25,19 +25,16 @@ studyfetch_sdk/_utils/_typing.py,sha256=D0DbbNu8GnYQTSICnTSHDGsYXj8TcAKyhejb0Xcn
25
25
  studyfetch_sdk/_utils/_utils.py,sha256=ts4CiiuNpFiGB6YMdkQRh2SZvYvsl7mAF-JWHCcLDf4,12312
26
26
  studyfetch_sdk/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
27
27
  studyfetch_sdk/resources/__init__.py,sha256=TSJ6b8GNHShyK5w7efHV93u1bY2jYVySQRa2zKc1dKM,500
28
- studyfetch_sdk/resources/v1/__init__.py,sha256=HZXFDwaXIHuWpFG74ZBEcvBkOGtBuUkV974tf0bBGCI,6572
28
+ studyfetch_sdk/resources/v1/__init__.py,sha256=XNPhLPJfTtp8K9whE5qPjt0s-awT15mJ9aHeGFCBr-A,6148
29
29
  studyfetch_sdk/resources/v1/components.py,sha256=iU4cy-l8k6_RBtsMvjag0E29nWJpSyktuCFhi4TZEh4,35435
30
30
  studyfetch_sdk/resources/v1/explainers.py,sha256=W5Kq3Gpwqw3kBy9v-qpV5FKxH1HAm5_yk1NgACM-Mec,16047
31
31
  studyfetch_sdk/resources/v1/flashcards.py,sha256=_-zZUd8Ja9k2895cxLJsLbN73ZTIrkJaComGCSMkbCk,29242
32
32
  studyfetch_sdk/resources/v1/folders.py,sha256=o43HhcVhqF3t7xWMFFNIiMPElhoqkXtaCTVjEE5s5so,27436
33
33
  studyfetch_sdk/resources/v1/usage.py,sha256=78OlA8pT13Ggja84nHdJJQoKSn7GjDO3SefPyxsCYWo,18513
34
- studyfetch_sdk/resources/v1/v1.py,sha256=5noiTRTSDFikwpc1bxuDI8JuUHROl7vUa-hLitpWDbA,16705
34
+ studyfetch_sdk/resources/v1/v1.py,sha256=7A5sAf4Z7xjyXJ18BRzEa-W2Vf5kWLb_YR6ZaGosaRM,15705
35
35
  studyfetch_sdk/resources/v1/audio_recaps/__init__.py,sha256=X6oJGmyaqUBFChSn8l0r-EHjCZos36O10zfFYWuid2w,1094
36
36
  studyfetch_sdk/resources/v1/audio_recaps/audio_recaps.py,sha256=XAfSWFDbjUSp9bKjDVHqLyrEv3kNtTYSaLtWPRFIzdc,12630
37
37
  studyfetch_sdk/resources/v1/audio_recaps/sections.py,sha256=AcYtFSNemNP2T-fJn2nZkrPNNpaEtqiwPNuTpual2Lw,9451
38
- studyfetch_sdk/resources/v1/auth/__init__.py,sha256=YoujojaKcfwWPoS9E2_PYpMbgs6lswtGD01CMMrQ4iI,1016
39
- studyfetch_sdk/resources/v1/auth/auth.py,sha256=3YdW8S67YtkPtNvBvyKtyqiY7fU09vkwCCfR_hgdU3Q,6234
40
- studyfetch_sdk/resources/v1/auth/number_2fa.py,sha256=QgfvK7_m-Kko29XYyDSlAWFv6l7xRF8t6ndNAW5kBz8,6195
41
38
  studyfetch_sdk/resources/v1/chat/__init__.py,sha256=WSv53HDkoj5Ec37hiJlCV2V-ZquTjYyG5hU9cOdZPBk,1426
42
39
  studyfetch_sdk/resources/v1/chat/chat.py,sha256=PFySkZ3HsxthOYe5QZYAKkSwJryo6tE7Tl53f7DscYo,21666
43
40
  studyfetch_sdk/resources/v1/chat/sessions.py,sha256=mjcTJFft2zXyQlqhARz_J5md1BfAD3uhDVp-olow83o,8479
@@ -106,8 +103,6 @@ studyfetch_sdk/types/v1/usage_get_stats_params.py,sha256=TQwpTxrPjfa7OA-UdYOVppb
106
103
  studyfetch_sdk/types/v1/usage_get_summary_params.py,sha256=ZFd6VwpQxL59a2akaJDRZbJJcNbZ88KU4S6UreCZr4U,768
107
104
  studyfetch_sdk/types/v1/usage_list_events_params.py,sha256=iMhwqdlaEbtyBqlTpAEcTdYCQumwWVmYBo8czDPLm74,1729
108
105
  studyfetch_sdk/types/v1/audio_recaps/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
109
- studyfetch_sdk/types/v1/auth/__init__.py,sha256=kmP7LURAJVk6-7RX73vhbBFvQzj5-acFH7_zNbJNbrs,215
110
- studyfetch_sdk/types/v1/auth/number_2fa_send_code_params.py,sha256=kb8JNsBwu45iiCr7FFLSADKccPN4dgIVQWEleTNSr50,336
111
106
  studyfetch_sdk/types/v1/chat/__init__.py,sha256=wYABOEkbpJ2giFls8t8N32vNezDWQvFRnPw_giWy58g,207
112
107
  studyfetch_sdk/types/v1/chat/session_retrieve_params.py,sha256=G9P18vHLjgrLTVyWyKv8KGr0Pa4W9e8ZubMysxpty6I,290
113
108
  studyfetch_sdk/types/v1/embed/__init__.py,sha256=PY0v530kkkL8N0ABYvRpyNG0B4-56axqoZ1Gbp6GYq0,303
@@ -121,7 +116,7 @@ studyfetch_sdk/types/v1/scenarios/component_update_params.py,sha256=_Rs0wRJtrLMK
121
116
  studyfetch_sdk/types/v1/scenarios/submissions/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
122
117
  studyfetch_sdk/types/v1/tests/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
123
118
  studyfetch_sdk/types/v1/upload/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
124
- studyfetch_sdk-0.1.0a6.dist-info/METADATA,sha256=8ZIHa1YDL1yi2bPn2RtaB-kqhXsdWx9PXaFJC3dA7CI,15046
125
- studyfetch_sdk-0.1.0a6.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
126
- studyfetch_sdk-0.1.0a6.dist-info/licenses/LICENSE,sha256=CsdbJMegH_AAWljUmVcwW0Cj_GyIm1hjw6qPqPnmdn4,11344
127
- studyfetch_sdk-0.1.0a6.dist-info/RECORD,,
119
+ studyfetch_sdk-0.1.0a8.dist-info/METADATA,sha256=VHHBvOO_WDRqb1TF3L3MDLENKgVAziwaKJjdgIIV8yc,14699
120
+ studyfetch_sdk-0.1.0a8.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
121
+ studyfetch_sdk-0.1.0a8.dist-info/licenses/LICENSE,sha256=CsdbJMegH_AAWljUmVcwW0Cj_GyIm1hjw6qPqPnmdn4,11344
122
+ studyfetch_sdk-0.1.0a8.dist-info/RECORD,,
@@ -1,33 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from .auth import (
4
- AuthResource,
5
- AsyncAuthResource,
6
- AuthResourceWithRawResponse,
7
- AsyncAuthResourceWithRawResponse,
8
- AuthResourceWithStreamingResponse,
9
- AsyncAuthResourceWithStreamingResponse,
10
- )
11
- from .number_2fa import (
12
- Number2faResource,
13
- AsyncNumber2faResource,
14
- Number2faResourceWithRawResponse,
15
- AsyncNumber2faResourceWithRawResponse,
16
- Number2faResourceWithStreamingResponse,
17
- AsyncNumber2faResourceWithStreamingResponse,
18
- )
19
-
20
- __all__ = [
21
- "Number2faResource",
22
- "AsyncNumber2faResource",
23
- "Number2faResourceWithRawResponse",
24
- "AsyncNumber2faResourceWithRawResponse",
25
- "Number2faResourceWithStreamingResponse",
26
- "AsyncNumber2faResourceWithStreamingResponse",
27
- "AuthResource",
28
- "AsyncAuthResource",
29
- "AuthResourceWithRawResponse",
30
- "AsyncAuthResourceWithRawResponse",
31
- "AuthResourceWithStreamingResponse",
32
- "AsyncAuthResourceWithStreamingResponse",
33
- ]
@@ -1,168 +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 .number_2fa import (
10
- Number2faResource,
11
- AsyncNumber2faResource,
12
- Number2faResourceWithRawResponse,
13
- AsyncNumber2faResourceWithRawResponse,
14
- Number2faResourceWithStreamingResponse,
15
- AsyncNumber2faResourceWithStreamingResponse,
16
- )
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__ = ["AuthResource", "AsyncAuthResource"]
27
-
28
-
29
- class AuthResource(SyncAPIResource):
30
- @cached_property
31
- def number_2fa(self) -> Number2faResource:
32
- return Number2faResource(self._client)
33
-
34
- @cached_property
35
- def with_raw_response(self) -> AuthResourceWithRawResponse:
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 AuthResourceWithRawResponse(self)
43
-
44
- @cached_property
45
- def with_streaming_response(self) -> AuthResourceWithStreamingResponse:
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 AuthResourceWithStreamingResponse(self)
52
-
53
- def verify_reset_token(
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
- """Verify password reset token"""
64
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
65
- return self._post(
66
- "/api/v1/auth/verify-reset-token",
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 AsyncAuthResource(AsyncAPIResource):
75
- @cached_property
76
- def number_2fa(self) -> AsyncNumber2faResource:
77
- return AsyncNumber2faResource(self._client)
78
-
79
- @cached_property
80
- def with_raw_response(self) -> AsyncAuthResourceWithRawResponse:
81
- """
82
- This property can be used as a prefix for any HTTP method call to return
83
- the raw response object instead of the parsed content.
84
-
85
- For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
86
- """
87
- return AsyncAuthResourceWithRawResponse(self)
88
-
89
- @cached_property
90
- def with_streaming_response(self) -> AsyncAuthResourceWithStreamingResponse:
91
- """
92
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
93
-
94
- For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
95
- """
96
- return AsyncAuthResourceWithStreamingResponse(self)
97
-
98
- async def verify_reset_token(
99
- self,
100
- *,
101
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
102
- # The extra values given here take precedence over values defined on the client or passed to this method.
103
- extra_headers: Headers | None = None,
104
- extra_query: Query | None = None,
105
- extra_body: Body | None = None,
106
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
107
- ) -> None:
108
- """Verify password reset token"""
109
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
110
- return await self._post(
111
- "/api/v1/auth/verify-reset-token",
112
- options=make_request_options(
113
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
114
- ),
115
- cast_to=NoneType,
116
- )
117
-
118
-
119
- class AuthResourceWithRawResponse:
120
- def __init__(self, auth: AuthResource) -> None:
121
- self._auth = auth
122
-
123
- self.verify_reset_token = to_raw_response_wrapper(
124
- auth.verify_reset_token,
125
- )
126
-
127
- @cached_property
128
- def number_2fa(self) -> Number2faResourceWithRawResponse:
129
- return Number2faResourceWithRawResponse(self._auth.number_2fa)
130
-
131
-
132
- class AsyncAuthResourceWithRawResponse:
133
- def __init__(self, auth: AsyncAuthResource) -> None:
134
- self._auth = auth
135
-
136
- self.verify_reset_token = async_to_raw_response_wrapper(
137
- auth.verify_reset_token,
138
- )
139
-
140
- @cached_property
141
- def number_2fa(self) -> AsyncNumber2faResourceWithRawResponse:
142
- return AsyncNumber2faResourceWithRawResponse(self._auth.number_2fa)
143
-
144
-
145
- class AuthResourceWithStreamingResponse:
146
- def __init__(self, auth: AuthResource) -> None:
147
- self._auth = auth
148
-
149
- self.verify_reset_token = to_streamed_response_wrapper(
150
- auth.verify_reset_token,
151
- )
152
-
153
- @cached_property
154
- def number_2fa(self) -> Number2faResourceWithStreamingResponse:
155
- return Number2faResourceWithStreamingResponse(self._auth.number_2fa)
156
-
157
-
158
- class AsyncAuthResourceWithStreamingResponse:
159
- def __init__(self, auth: AsyncAuthResource) -> None:
160
- self._auth = auth
161
-
162
- self.verify_reset_token = async_to_streamed_response_wrapper(
163
- auth.verify_reset_token,
164
- )
165
-
166
- @cached_property
167
- def number_2fa(self) -> AsyncNumber2faResourceWithStreamingResponse:
168
- return AsyncNumber2faResourceWithStreamingResponse(self._auth.number_2fa)
@@ -1,164 +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 ...._utils import maybe_transform, async_maybe_transform
9
- from ...._compat import cached_property
10
- from ...._resource import SyncAPIResource, AsyncAPIResource
11
- from ...._response import (
12
- to_raw_response_wrapper,
13
- to_streamed_response_wrapper,
14
- async_to_raw_response_wrapper,
15
- async_to_streamed_response_wrapper,
16
- )
17
- from ...._base_client import make_request_options
18
- from ....types.v1.auth import number_2fa_send_code_params
19
-
20
- __all__ = ["Number2faResource", "AsyncNumber2faResource"]
21
-
22
-
23
- class Number2faResource(SyncAPIResource):
24
- @cached_property
25
- def with_raw_response(self) -> Number2faResourceWithRawResponse:
26
- """
27
- This property can be used as a prefix for any HTTP method call to return
28
- the raw response object instead of the parsed content.
29
-
30
- For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
31
- """
32
- return Number2faResourceWithRawResponse(self)
33
-
34
- @cached_property
35
- def with_streaming_response(self) -> Number2faResourceWithStreamingResponse:
36
- """
37
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
38
-
39
- For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
40
- """
41
- return Number2faResourceWithStreamingResponse(self)
42
-
43
- def send_code(
44
- self,
45
- *,
46
- email: str,
47
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
48
- # The extra values given here take precedence over values defined on the client or passed to this method.
49
- extra_headers: Headers | None = None,
50
- extra_query: Query | None = None,
51
- extra_body: Body | None = None,
52
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
53
- ) -> None:
54
- """
55
- Args:
56
- email: Email to send verification code
57
-
58
- extra_headers: Send extra headers
59
-
60
- extra_query: Add additional query parameters to the request
61
-
62
- extra_body: Add additional JSON properties to the request
63
-
64
- timeout: Override the client-level default timeout for this request, in seconds
65
- """
66
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
67
- return self._post(
68
- "/api/v1/auth/2fa/send-code",
69
- body=maybe_transform({"email": email}, number_2fa_send_code_params.Number2faSendCodeParams),
70
- options=make_request_options(
71
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
72
- ),
73
- cast_to=NoneType,
74
- )
75
-
76
-
77
- class AsyncNumber2faResource(AsyncAPIResource):
78
- @cached_property
79
- def with_raw_response(self) -> AsyncNumber2faResourceWithRawResponse:
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 AsyncNumber2faResourceWithRawResponse(self)
87
-
88
- @cached_property
89
- def with_streaming_response(self) -> AsyncNumber2faResourceWithStreamingResponse:
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 AsyncNumber2faResourceWithStreamingResponse(self)
96
-
97
- async def send_code(
98
- self,
99
- *,
100
- email: str,
101
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
102
- # The extra values given here take precedence over values defined on the client or passed to this method.
103
- extra_headers: Headers | None = None,
104
- extra_query: Query | None = None,
105
- extra_body: Body | None = None,
106
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
107
- ) -> None:
108
- """
109
- Args:
110
- email: Email to send verification code
111
-
112
- extra_headers: Send extra headers
113
-
114
- extra_query: Add additional query parameters to the request
115
-
116
- extra_body: Add additional JSON properties to the request
117
-
118
- timeout: Override the client-level default timeout for this request, in seconds
119
- """
120
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
121
- return await self._post(
122
- "/api/v1/auth/2fa/send-code",
123
- body=await async_maybe_transform({"email": email}, number_2fa_send_code_params.Number2faSendCodeParams),
124
- options=make_request_options(
125
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
126
- ),
127
- cast_to=NoneType,
128
- )
129
-
130
-
131
- class Number2faResourceWithRawResponse:
132
- def __init__(self, number_2fa: Number2faResource) -> None:
133
- self._number_2fa = number_2fa
134
-
135
- self.send_code = to_raw_response_wrapper(
136
- number_2fa.send_code,
137
- )
138
-
139
-
140
- class AsyncNumber2faResourceWithRawResponse:
141
- def __init__(self, number_2fa: AsyncNumber2faResource) -> None:
142
- self._number_2fa = number_2fa
143
-
144
- self.send_code = async_to_raw_response_wrapper(
145
- number_2fa.send_code,
146
- )
147
-
148
-
149
- class Number2faResourceWithStreamingResponse:
150
- def __init__(self, number_2fa: Number2faResource) -> None:
151
- self._number_2fa = number_2fa
152
-
153
- self.send_code = to_streamed_response_wrapper(
154
- number_2fa.send_code,
155
- )
156
-
157
-
158
- class AsyncNumber2faResourceWithStreamingResponse:
159
- def __init__(self, number_2fa: AsyncNumber2faResource) -> None:
160
- self._number_2fa = number_2fa
161
-
162
- self.send_code = async_to_streamed_response_wrapper(
163
- number_2fa.send_code,
164
- )
@@ -1,5 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from __future__ import annotations
4
-
5
- from .number_2fa_send_code_params import Number2faSendCodeParams as Number2faSendCodeParams
@@ -1,12 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from __future__ import annotations
4
-
5
- from typing_extensions import Required, TypedDict
6
-
7
- __all__ = ["Number2faSendCodeParams"]
8
-
9
-
10
- class Number2faSendCodeParams(TypedDict, total=False):
11
- email: Required[str]
12
- """Email to send verification code"""