pyrestsdk.request package — PyRESTSDK documentation

# pyrestsdk.request package

## Subpackages

- pyrestsdk.request.supports_types package
  - Subpackages
    - pyrestsdk.request.supports_types.methods package
      - Module contents
  - Module contents
    - `SupportsBaseInvokeRequest`
      - `SupportsBaseInvokeRequest.Send()`
      - `SupportsBaseInvokeRequest.generic_type`
      - `SupportsBaseInvokeRequest.input_object`
      - `SupportsBaseInvokeRequest.invoke_request()`
    - `SupportsDeleteMethod`
      - `SupportsDeleteMethod.Delete`
    - `SupportsGetMethod`
      - `SupportsGetMethod.Get`
    - `SupportsHeaderOptions`
      - `SupportsHeaderOptions.header_options`
    - `SupportsInvokeCollectionRequest`
      - `SupportsInvokeCollectionRequest.invoke_request`
    - `SupportsInvokeRequest`
      - `SupportsInvokeRequest.invoke_request`
    - `SupportsPostMethod`
      - `SupportsPostMethod.Post()`
    - `SupportsPutMethod`
      - `SupportsPutMethod.Put()`
    - `SupportsQueryOptions`
      - `SupportsQueryOptions.query_options`

## Module contents

Requests

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

  Bases: `Request`[`T`]

  The Base Request Type

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

    Parses the response into the expected return

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

  Bases: `AbstractRequest`[`T`]

  property Client: S

    Gets the Client

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

    Submits the request and returns the expected return

  append_segment_to_request_url(url_segment: str) → str

    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

    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

    Makes the desired request and returns the desired return type