rasenmaeher_api.prodcutapihelpers

Product integration API helpers

Module Contents

Functions

check_kraftwerk_manifest()

Check that settings has manifest

post_to_all_products(url_suffix, data, respose_schema)

Call given POST endpoint on call products in the manifest

put_to_all_products(url_suffix, data, respose_schema)

Call given PUT endpoint on call products in the manifest

get_from_all_products(url_suffix, respose_schema[, ...])

Call given GET endpoint on call products in the manifest

_method_to_all_products(methodname, url_suffix, data, ...)

Call given POST endpoint on call products in the manifest

Attributes

LOGGER

LOGGER[source]
check_kraftwerk_manifest()[source]

Check that settings has manifest

Return type:

bool

async post_to_all_products(url_suffix, data, respose_schema, collect_responses=True)[source]

Call given POST endpoint on call products in the manifest

Parameters:
  • url_suffix (str)

  • data (Mapping[str, Any])

  • respose_schema (Type[pydantic.BaseModel])

  • collect_responses (bool)

Return type:

Optional[Dict[str, Optional[pydantic.BaseModel]]]

async put_to_all_products(url_suffix, data, respose_schema, collect_responses=True)[source]

Call given PUT endpoint on call products in the manifest

Parameters:
  • url_suffix (str)

  • data (Mapping[str, Any])

  • respose_schema (Type[pydantic.BaseModel])

  • collect_responses (bool)

Return type:

Optional[Dict[str, Optional[pydantic.BaseModel]]]

async get_from_all_products(url_suffix, respose_schema, collect_responses=True)[source]

Call given GET endpoint on call products in the manifest

Parameters:
  • url_suffix (str)

  • respose_schema (Type[pydantic.BaseModel])

  • collect_responses (bool)

Return type:

Optional[Dict[str, Optional[pydantic.BaseModel]]]

async _method_to_all_products(methodname, url_suffix, data, respose_schema, collect_responses=True)[source]

Call given POST endpoint on call products in the manifest

Parameters:
  • methodname (str)

  • url_suffix (str)

  • data (Optional[Mapping[str, Any]])

  • respose_schema (Type[pydantic.BaseModel])

  • collect_responses (bool)

Return type:

Optional[Dict[str, Optional[pydantic.BaseModel]]]