studyfetch-sdk 0.1.0a19__py3-none-any.whl → 0.1.0a21__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.
Files changed (87) hide show
  1. studyfetch_sdk/_models.py +23 -2
  2. studyfetch_sdk/_version.py +1 -1
  3. studyfetch_sdk/resources/v1/__init__.py +6 -104
  4. studyfetch_sdk/resources/v1/chat.py +246 -0
  5. studyfetch_sdk/resources/v1/materials/materials.py +304 -0
  6. studyfetch_sdk/resources/v1/materials/upload.py +30 -14
  7. studyfetch_sdk/resources/v1/v1.py +20 -244
  8. studyfetch_sdk/types/v1/__init__.py +3 -22
  9. studyfetch_sdk/types/v1/chat_stream_params.py +39 -7
  10. studyfetch_sdk/types/v1/component_create_params.py +24 -0
  11. studyfetch_sdk/types/v1/component_generate_embed_params.py +7 -1
  12. studyfetch_sdk/types/v1/generated_material.py +65 -0
  13. studyfetch_sdk/types/v1/material_generate_and_process_params.py +38 -0
  14. studyfetch_sdk/types/v1/material_generate_params.py +32 -0
  15. studyfetch_sdk/types/v1/materials/upload_complete_upload_params.py +2 -5
  16. studyfetch_sdk/types/v1/materials/upload_create_presigned_url_params.py +3 -0
  17. studyfetch_sdk/types/v1/materials/upload_upload_file_and_process_params.py +4 -1
  18. studyfetch_sdk/types/v1/materials/upload_upload_file_params.py +3 -0
  19. {studyfetch_sdk-0.1.0a19.dist-info → studyfetch_sdk-0.1.0a21.dist-info}/METADATA +1 -1
  20. {studyfetch_sdk-0.1.0a19.dist-info → studyfetch_sdk-0.1.0a21.dist-info}/RECORD +22 -83
  21. studyfetch_sdk/resources/v1/audio_recaps/__init__.py +0 -33
  22. studyfetch_sdk/resources/v1/audio_recaps/audio_recaps.py +0 -328
  23. studyfetch_sdk/resources/v1/audio_recaps/sections.py +0 -250
  24. studyfetch_sdk/resources/v1/chat/__init__.py +0 -47
  25. studyfetch_sdk/resources/v1/chat/chat.py +0 -574
  26. studyfetch_sdk/resources/v1/chat/sessions.py +0 -222
  27. studyfetch_sdk/resources/v1/chat/test.py +0 -190
  28. studyfetch_sdk/resources/v1/data_analyst/__init__.py +0 -47
  29. studyfetch_sdk/resources/v1/data_analyst/data_analyst.py +0 -582
  30. studyfetch_sdk/resources/v1/data_analyst/sessions.py +0 -222
  31. studyfetch_sdk/resources/v1/data_analyst/test.py +0 -190
  32. studyfetch_sdk/resources/v1/explainers.py +0 -441
  33. studyfetch_sdk/resources/v1/flashcards.py +0 -783
  34. studyfetch_sdk/resources/v1/scenarios/__init__.py +0 -61
  35. studyfetch_sdk/resources/v1/scenarios/component.py +0 -426
  36. studyfetch_sdk/resources/v1/scenarios/scenarios.py +0 -936
  37. studyfetch_sdk/resources/v1/scenarios/sessions.py +0 -236
  38. studyfetch_sdk/resources/v1/scenarios/submissions/__init__.py +0 -33
  39. studyfetch_sdk/resources/v1/scenarios/submissions/submissions.py +0 -102
  40. studyfetch_sdk/resources/v1/scenarios/submissions/user.py +0 -210
  41. studyfetch_sdk/resources/v1/tests/__init__.py +0 -33
  42. studyfetch_sdk/resources/v1/tests/component.py +0 -160
  43. studyfetch_sdk/resources/v1/tests/tests.py +0 -682
  44. studyfetch_sdk/resources/v1/upload/__init__.py +0 -33
  45. studyfetch_sdk/resources/v1/upload/component.py +0 -572
  46. studyfetch_sdk/resources/v1/upload/upload.py +0 -102
  47. studyfetch_sdk/types/v1/audio_recaps/__init__.py +0 -3
  48. studyfetch_sdk/types/v1/chat/__init__.py +0 -5
  49. studyfetch_sdk/types/v1/chat/session_retrieve_params.py +0 -11
  50. studyfetch_sdk/types/v1/chat_get_session_params.py +0 -13
  51. studyfetch_sdk/types/v1/chat_send_message_params.py +0 -54
  52. studyfetch_sdk/types/v1/data_analyst/__init__.py +0 -5
  53. studyfetch_sdk/types/v1/data_analyst/session_retrieve_params.py +0 -11
  54. studyfetch_sdk/types/v1/data_analyst_retrieve_session_params.py +0 -13
  55. studyfetch_sdk/types/v1/data_analyst_send_message_params.py +0 -54
  56. studyfetch_sdk/types/v1/data_analyst_stream_params.py +0 -28
  57. studyfetch_sdk/types/v1/explainer_create_params.py +0 -45
  58. studyfetch_sdk/types/v1/explainer_handle_webhook_params.py +0 -53
  59. studyfetch_sdk/types/v1/flashcard_batch_process_params.py +0 -36
  60. studyfetch_sdk/types/v1/flashcard_batch_process_response.py +0 -39
  61. studyfetch_sdk/types/v1/flashcard_get_algorithm_response.py +0 -37
  62. studyfetch_sdk/types/v1/flashcard_get_all_params.py +0 -23
  63. studyfetch_sdk/types/v1/flashcard_get_due_params.py +0 -19
  64. studyfetch_sdk/types/v1/flashcard_get_stats_params.py +0 -17
  65. studyfetch_sdk/types/v1/flashcard_get_types_response.py +0 -14
  66. studyfetch_sdk/types/v1/flashcard_rate_params.py +0 -23
  67. studyfetch_sdk/types/v1/scenario_create_params.py +0 -48
  68. studyfetch_sdk/types/v1/scenario_submit_answer_params.py +0 -18
  69. studyfetch_sdk/types/v1/scenario_update_params.py +0 -45
  70. studyfetch_sdk/types/v1/scenarios/__init__.py +0 -5
  71. studyfetch_sdk/types/v1/scenarios/component_update_params.py +0 -45
  72. studyfetch_sdk/types/v1/scenarios/submissions/__init__.py +0 -3
  73. studyfetch_sdk/types/v1/test_create_params.py +0 -20
  74. studyfetch_sdk/types/v1/test_retake_params.py +0 -14
  75. studyfetch_sdk/types/v1/test_submit_answer_params.py +0 -20
  76. studyfetch_sdk/types/v1/test_submit_params.py +0 -14
  77. studyfetch_sdk/types/v1/tests/__init__.py +0 -3
  78. studyfetch_sdk/types/v1/upload/__init__.py +0 -11
  79. studyfetch_sdk/types/v1/upload/component_complete_upload_params.py +0 -20
  80. studyfetch_sdk/types/v1/upload/component_complete_upload_response.py +0 -16
  81. studyfetch_sdk/types/v1/upload/component_get_presigned_url_params.py +0 -23
  82. studyfetch_sdk/types/v1/upload/component_get_presigned_url_response.py +0 -15
  83. studyfetch_sdk/types/v1/upload/component_upload_file_params.py +0 -21
  84. studyfetch_sdk/types/v1/upload/component_upload_url_params.py +0 -23
  85. studyfetch_sdk/types/v1/upload/file_upload_response.py +0 -24
  86. {studyfetch_sdk-0.1.0a19.dist-info → studyfetch_sdk-0.1.0a21.dist-info}/WHEEL +0 -0
  87. {studyfetch_sdk-0.1.0a19.dist-info → studyfetch_sdk-0.1.0a21.dist-info}/licenses/LICENSE +0 -0
@@ -1,236 +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__ = ["SessionsResource", "AsyncSessionsResource"]
19
-
20
-
21
- class SessionsResource(SyncAPIResource):
22
- @cached_property
23
- def with_raw_response(self) -> SessionsResourceWithRawResponse:
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 SessionsResourceWithRawResponse(self)
31
-
32
- @cached_property
33
- def with_streaming_response(self) -> SessionsResourceWithStreamingResponse:
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 SessionsResourceWithStreamingResponse(self)
40
-
41
- def complete(
42
- self,
43
- session_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 session_id:
63
- raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
64
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
65
- return self._put(
66
- f"/api/v1/scenarios/sessions/{session_id}/complete",
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 start(
74
- self,
75
- id: str,
76
- *,
77
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
78
- # The extra values given here take precedence over values defined on the client or passed to this method.
79
- extra_headers: Headers | None = None,
80
- extra_query: Query | None = None,
81
- extra_body: Body | None = None,
82
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
83
- ) -> None:
84
- """
85
- Args:
86
- extra_headers: Send extra headers
87
-
88
- extra_query: Add additional query parameters to the request
89
-
90
- extra_body: Add additional JSON properties to the request
91
-
92
- timeout: Override the client-level default timeout for this request, in seconds
93
- """
94
- if not id:
95
- raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
96
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
97
- return self._post(
98
- f"/api/v1/scenarios/{id}/sessions/start",
99
- options=make_request_options(
100
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
101
- ),
102
- cast_to=NoneType,
103
- )
104
-
105
-
106
- class AsyncSessionsResource(AsyncAPIResource):
107
- @cached_property
108
- def with_raw_response(self) -> AsyncSessionsResourceWithRawResponse:
109
- """
110
- This property can be used as a prefix for any HTTP method call to return
111
- the raw response object instead of the parsed content.
112
-
113
- For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
114
- """
115
- return AsyncSessionsResourceWithRawResponse(self)
116
-
117
- @cached_property
118
- def with_streaming_response(self) -> AsyncSessionsResourceWithStreamingResponse:
119
- """
120
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
121
-
122
- For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
123
- """
124
- return AsyncSessionsResourceWithStreamingResponse(self)
125
-
126
- async def complete(
127
- self,
128
- session_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
- Args:
139
- extra_headers: Send extra headers
140
-
141
- extra_query: Add additional query parameters to the request
142
-
143
- extra_body: Add additional JSON properties to the request
144
-
145
- timeout: Override the client-level default timeout for this request, in seconds
146
- """
147
- if not session_id:
148
- raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
149
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
150
- return await self._put(
151
- f"/api/v1/scenarios/sessions/{session_id}/complete",
152
- options=make_request_options(
153
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
154
- ),
155
- cast_to=NoneType,
156
- )
157
-
158
- async def start(
159
- self,
160
- id: str,
161
- *,
162
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
163
- # The extra values given here take precedence over values defined on the client or passed to this method.
164
- extra_headers: Headers | None = None,
165
- extra_query: Query | None = None,
166
- extra_body: Body | None = None,
167
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
168
- ) -> None:
169
- """
170
- Args:
171
- extra_headers: Send extra headers
172
-
173
- extra_query: Add additional query parameters to the request
174
-
175
- extra_body: Add additional JSON properties to the request
176
-
177
- timeout: Override the client-level default timeout for this request, in seconds
178
- """
179
- if not id:
180
- raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
181
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
182
- return await self._post(
183
- f"/api/v1/scenarios/{id}/sessions/start",
184
- options=make_request_options(
185
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
186
- ),
187
- cast_to=NoneType,
188
- )
189
-
190
-
191
- class SessionsResourceWithRawResponse:
192
- def __init__(self, sessions: SessionsResource) -> None:
193
- self._sessions = sessions
194
-
195
- self.complete = to_raw_response_wrapper(
196
- sessions.complete,
197
- )
198
- self.start = to_raw_response_wrapper(
199
- sessions.start,
200
- )
201
-
202
-
203
- class AsyncSessionsResourceWithRawResponse:
204
- def __init__(self, sessions: AsyncSessionsResource) -> None:
205
- self._sessions = sessions
206
-
207
- self.complete = async_to_raw_response_wrapper(
208
- sessions.complete,
209
- )
210
- self.start = async_to_raw_response_wrapper(
211
- sessions.start,
212
- )
213
-
214
-
215
- class SessionsResourceWithStreamingResponse:
216
- def __init__(self, sessions: SessionsResource) -> None:
217
- self._sessions = sessions
218
-
219
- self.complete = to_streamed_response_wrapper(
220
- sessions.complete,
221
- )
222
- self.start = to_streamed_response_wrapper(
223
- sessions.start,
224
- )
225
-
226
-
227
- class AsyncSessionsResourceWithStreamingResponse:
228
- def __init__(self, sessions: AsyncSessionsResource) -> None:
229
- self._sessions = sessions
230
-
231
- self.complete = async_to_streamed_response_wrapper(
232
- sessions.complete,
233
- )
234
- self.start = async_to_streamed_response_wrapper(
235
- sessions.start,
236
- )
@@ -1,33 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from .user import (
4
- UserResource,
5
- AsyncUserResource,
6
- UserResourceWithRawResponse,
7
- AsyncUserResourceWithRawResponse,
8
- UserResourceWithStreamingResponse,
9
- AsyncUserResourceWithStreamingResponse,
10
- )
11
- from .submissions import (
12
- SubmissionsResource,
13
- AsyncSubmissionsResource,
14
- SubmissionsResourceWithRawResponse,
15
- AsyncSubmissionsResourceWithRawResponse,
16
- SubmissionsResourceWithStreamingResponse,
17
- AsyncSubmissionsResourceWithStreamingResponse,
18
- )
19
-
20
- __all__ = [
21
- "UserResource",
22
- "AsyncUserResource",
23
- "UserResourceWithRawResponse",
24
- "AsyncUserResourceWithRawResponse",
25
- "UserResourceWithStreamingResponse",
26
- "AsyncUserResourceWithStreamingResponse",
27
- "SubmissionsResource",
28
- "AsyncSubmissionsResource",
29
- "SubmissionsResourceWithRawResponse",
30
- "AsyncSubmissionsResourceWithRawResponse",
31
- "SubmissionsResourceWithStreamingResponse",
32
- "AsyncSubmissionsResourceWithStreamingResponse",
33
- ]
@@ -1,102 +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 .user import (
6
- UserResource,
7
- AsyncUserResource,
8
- UserResourceWithRawResponse,
9
- AsyncUserResourceWithRawResponse,
10
- UserResourceWithStreamingResponse,
11
- AsyncUserResourceWithStreamingResponse,
12
- )
13
- from ....._compat import cached_property
14
- from ....._resource import SyncAPIResource, AsyncAPIResource
15
-
16
- __all__ = ["SubmissionsResource", "AsyncSubmissionsResource"]
17
-
18
-
19
- class SubmissionsResource(SyncAPIResource):
20
- @cached_property
21
- def user(self) -> UserResource:
22
- return UserResource(self._client)
23
-
24
- @cached_property
25
- def with_raw_response(self) -> SubmissionsResourceWithRawResponse:
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 SubmissionsResourceWithRawResponse(self)
33
-
34
- @cached_property
35
- def with_streaming_response(self) -> SubmissionsResourceWithStreamingResponse:
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 SubmissionsResourceWithStreamingResponse(self)
42
-
43
-
44
- class AsyncSubmissionsResource(AsyncAPIResource):
45
- @cached_property
46
- def user(self) -> AsyncUserResource:
47
- return AsyncUserResource(self._client)
48
-
49
- @cached_property
50
- def with_raw_response(self) -> AsyncSubmissionsResourceWithRawResponse:
51
- """
52
- This property can be used as a prefix for any HTTP method call to return
53
- the raw response object instead of the parsed content.
54
-
55
- For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
56
- """
57
- return AsyncSubmissionsResourceWithRawResponse(self)
58
-
59
- @cached_property
60
- def with_streaming_response(self) -> AsyncSubmissionsResourceWithStreamingResponse:
61
- """
62
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
63
-
64
- For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
65
- """
66
- return AsyncSubmissionsResourceWithStreamingResponse(self)
67
-
68
-
69
- class SubmissionsResourceWithRawResponse:
70
- def __init__(self, submissions: SubmissionsResource) -> None:
71
- self._submissions = submissions
72
-
73
- @cached_property
74
- def user(self) -> UserResourceWithRawResponse:
75
- return UserResourceWithRawResponse(self._submissions.user)
76
-
77
-
78
- class AsyncSubmissionsResourceWithRawResponse:
79
- def __init__(self, submissions: AsyncSubmissionsResource) -> None:
80
- self._submissions = submissions
81
-
82
- @cached_property
83
- def user(self) -> AsyncUserResourceWithRawResponse:
84
- return AsyncUserResourceWithRawResponse(self._submissions.user)
85
-
86
-
87
- class SubmissionsResourceWithStreamingResponse:
88
- def __init__(self, submissions: SubmissionsResource) -> None:
89
- self._submissions = submissions
90
-
91
- @cached_property
92
- def user(self) -> UserResourceWithStreamingResponse:
93
- return UserResourceWithStreamingResponse(self._submissions.user)
94
-
95
-
96
- class AsyncSubmissionsResourceWithStreamingResponse:
97
- def __init__(self, submissions: AsyncSubmissionsResource) -> None:
98
- self._submissions = submissions
99
-
100
- @cached_property
101
- def user(self) -> AsyncUserResourceWithStreamingResponse:
102
- return AsyncUserResourceWithStreamingResponse(self._submissions.user)
@@ -1,210 +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__ = ["UserResource", "AsyncUserResource"]
19
-
20
-
21
- class UserResource(SyncAPIResource):
22
- @cached_property
23
- def with_raw_response(self) -> UserResourceWithRawResponse:
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 UserResourceWithRawResponse(self)
31
-
32
- @cached_property
33
- def with_streaming_response(self) -> UserResourceWithStreamingResponse:
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 UserResourceWithStreamingResponse(self)
40
-
41
- def get_all(
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._get(
53
- "/api/v1/scenarios/submissions/user",
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 get_by_scenario(
61
- self,
62
- id: str,
63
- *,
64
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
65
- # The extra values given here take precedence over values defined on the client or passed to this method.
66
- extra_headers: Headers | None = None,
67
- extra_query: Query | None = None,
68
- extra_body: Body | None = None,
69
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
70
- ) -> None:
71
- """
72
- Args:
73
- extra_headers: Send extra headers
74
-
75
- extra_query: Add additional query parameters to the request
76
-
77
- extra_body: Add additional JSON properties to the request
78
-
79
- timeout: Override the client-level default timeout for this request, in seconds
80
- """
81
- if not id:
82
- raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
83
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
84
- return self._get(
85
- f"/api/v1/scenarios/{id}/submissions/user",
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
-
93
- class AsyncUserResource(AsyncAPIResource):
94
- @cached_property
95
- def with_raw_response(self) -> AsyncUserResourceWithRawResponse:
96
- """
97
- This property can be used as a prefix for any HTTP method call to return
98
- the raw response object instead of the parsed content.
99
-
100
- For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
101
- """
102
- return AsyncUserResourceWithRawResponse(self)
103
-
104
- @cached_property
105
- def with_streaming_response(self) -> AsyncUserResourceWithStreamingResponse:
106
- """
107
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
108
-
109
- For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
110
- """
111
- return AsyncUserResourceWithStreamingResponse(self)
112
-
113
- async def get_all(
114
- self,
115
- *,
116
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
117
- # The extra values given here take precedence over values defined on the client or passed to this method.
118
- extra_headers: Headers | None = None,
119
- extra_query: Query | None = None,
120
- extra_body: Body | None = None,
121
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
122
- ) -> None:
123
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
124
- return await self._get(
125
- "/api/v1/scenarios/submissions/user",
126
- options=make_request_options(
127
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
128
- ),
129
- cast_to=NoneType,
130
- )
131
-
132
- async def get_by_scenario(
133
- self,
134
- 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 id:
154
- raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
155
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
156
- return await self._get(
157
- f"/api/v1/scenarios/{id}/submissions/user",
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
-
165
- class UserResourceWithRawResponse:
166
- def __init__(self, user: UserResource) -> None:
167
- self._user = user
168
-
169
- self.get_all = to_raw_response_wrapper(
170
- user.get_all,
171
- )
172
- self.get_by_scenario = to_raw_response_wrapper(
173
- user.get_by_scenario,
174
- )
175
-
176
-
177
- class AsyncUserResourceWithRawResponse:
178
- def __init__(self, user: AsyncUserResource) -> None:
179
- self._user = user
180
-
181
- self.get_all = async_to_raw_response_wrapper(
182
- user.get_all,
183
- )
184
- self.get_by_scenario = async_to_raw_response_wrapper(
185
- user.get_by_scenario,
186
- )
187
-
188
-
189
- class UserResourceWithStreamingResponse:
190
- def __init__(self, user: UserResource) -> None:
191
- self._user = user
192
-
193
- self.get_all = to_streamed_response_wrapper(
194
- user.get_all,
195
- )
196
- self.get_by_scenario = to_streamed_response_wrapper(
197
- user.get_by_scenario,
198
- )
199
-
200
-
201
- class AsyncUserResourceWithStreamingResponse:
202
- def __init__(self, user: AsyncUserResource) -> None:
203
- self._user = user
204
-
205
- self.get_all = async_to_streamed_response_wrapper(
206
- user.get_all,
207
- )
208
- self.get_by_scenario = async_to_streamed_response_wrapper(
209
- user.get_by_scenario,
210
- )
@@ -1,33 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from .tests import (
4
- TestsResource,
5
- AsyncTestsResource,
6
- TestsResourceWithRawResponse,
7
- AsyncTestsResourceWithRawResponse,
8
- TestsResourceWithStreamingResponse,
9
- AsyncTestsResourceWithStreamingResponse,
10
- )
11
- from .component import (
12
- ComponentResource,
13
- AsyncComponentResource,
14
- ComponentResourceWithRawResponse,
15
- AsyncComponentResourceWithRawResponse,
16
- ComponentResourceWithStreamingResponse,
17
- AsyncComponentResourceWithStreamingResponse,
18
- )
19
-
20
- __all__ = [
21
- "ComponentResource",
22
- "AsyncComponentResource",
23
- "ComponentResourceWithRawResponse",
24
- "AsyncComponentResourceWithRawResponse",
25
- "ComponentResourceWithStreamingResponse",
26
- "AsyncComponentResourceWithStreamingResponse",
27
- "TestsResource",
28
- "AsyncTestsResource",
29
- "TestsResourceWithRawResponse",
30
- "AsyncTestsResourceWithRawResponse",
31
- "TestsResourceWithStreamingResponse",
32
- "AsyncTestsResourceWithStreamingResponse",
33
- ]