Skip to content

Commit

Permalink
chore: add docstrings to raw response properties (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Sep 13, 2024
1 parent 213c89e commit 3296fbc
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/rizaio/resources/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,21 @@
class CommandResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> CommandResourceWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.
For more information, see https://www.github.com/riza-io/riza-api-python#accessing-raw-response-data-eg-headers
"""
return CommandResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> CommandResourceWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
For more information, see https://www.github.com/riza-io/riza-api-python#with_streaming_response
"""
return CommandResourceWithStreamingResponse(self)

def exec(
Expand Down Expand Up @@ -118,10 +129,21 @@ def exec(
class AsyncCommandResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncCommandResourceWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.
For more information, see https://www.github.com/riza-io/riza-api-python#accessing-raw-response-data-eg-headers
"""
return AsyncCommandResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AsyncCommandResourceWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
For more information, see https://www.github.com/riza-io/riza-api-python#with_streaming_response
"""
return AsyncCommandResourceWithStreamingResponse(self)

async def exec(
Expand Down

0 comments on commit 3296fbc

Please sign in to comment.