| 177 | |
| 178 | |
| 179 | class AsyncAppResource(AsyncAPIResource): |
| 180 | @cached_property |
| 181 | def with_raw_response(self) -> AsyncAppResourceWithRawResponse: |
| 182 | """ |
| 183 | This property can be used as a prefix for any HTTP method call to return |
| 184 | the raw response object instead of the parsed content. |
| 185 | |
| 186 | For more information, see https://www.github.com/sst/opencode-sdk-python#accessing-raw-response-data-eg-headers |
| 187 | """ |
| 188 | return AsyncAppResourceWithRawResponse(self) |
| 189 | |
| 190 | @cached_property |
| 191 | def with_streaming_response(self) -> AsyncAppResourceWithStreamingResponse: |
| 192 | """ |
| 193 | An alternative to `.with_raw_response` that doesn't eagerly read the response body. |
| 194 | |
| 195 | For more information, see https://www.github.com/sst/opencode-sdk-python#with_streaming_response |
| 196 | """ |
| 197 | return AsyncAppResourceWithStreamingResponse(self) |
| 198 | |
| 199 | async def get( |
| 200 | self, |
| 201 | *, |
| 202 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
| 203 | # The extra values given here take precedence over values defined on the client or passed to this method. |
| 204 | extra_headers: Headers | None = None, |
| 205 | extra_query: Query | None = None, |
| 206 | extra_body: Body | None = None, |
| 207 | timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
| 208 | ) -> App: |
| 209 | """Get app info""" |
| 210 | return await self._get( |
| 211 | "/app", |
| 212 | options=make_request_options( |
| 213 | extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout |
| 214 | ), |
| 215 | cast_to=App, |
| 216 | ) |
| 217 | |
| 218 | async def init( |
| 219 | self, |
| 220 | *, |
| 221 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
| 222 | # The extra values given here take precedence over values defined on the client or passed to this method. |
| 223 | extra_headers: Headers | None = None, |
| 224 | extra_query: Query | None = None, |
| 225 | extra_body: Body | None = None, |
| 226 | timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
| 227 | ) -> AppInitResponse: |
| 228 | """Initialize the app""" |
| 229 | return await self._post( |
| 230 | "/app/init", |
| 231 | options=make_request_options( |
| 232 | extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout |
| 233 | ), |
| 234 | cast_to=AppInitResponse, |
| 235 | ) |
| 236 |
nothing calls this directly
no outgoing calls
no test coverage detected