pyrestsdk.request package

Subpackages

Module contents

Requests

class pyrestsdk.request.BaseRequest(request_url: str, client: S, options: Iterable[O] | None)[source]

Bases: Request[T]

The Base Request Type

abstract parse_response(_response: Response | None) List[T] | T | None[source]

Parses the response into the expected return

class pyrestsdk.request.Request(request_url: str, client: S, options: Iterable[O] | None)[source]

Bases: AbstractRequest[T]

property Client: S

Gets the Client

Send(_Request__object: T | None) List[T] | T | None[source]

Submits the request and returns the expected return

append_segment_to_request_url(url_segment: str) str[source]

Gets a URL that is the request builder’s request URL with the segment appended.

Args:

url_segment (str): The segment to append to the request URL.

Returns:

str: A URL that is the request builder’s request URL with the segment appended.

property generic_type: Type[T]

Gets the the type argument provided

property header_options: HeaderOptionCollection

Gets the headers

abstract parse_response(_response: Response | None) List[T] | T | None[source]

Parses the response into the expected return

property request_method: HttpsMethod

Gets/Sets the https method

property request_url: str

Gets/Sets the request URL

Returns:

str: The request URL

send_request(value: T | None) List[T] | T | None[source]

Makes the desired request and returns the desired return type