Skip to content

Client

Handles all API get requests for the different endpoints.

__init__(base_url, endpoint, response_type)

Parameters:

Name Type Description Default
base_url str

the base URL to Solcast API

required
endpoint str

one of Solcast API's endpoints

required

delete(params)

Wrap _make_request to make a DEL request

Parameters:

Name Type Description Default
params dict

a dictionary of parameters that are passed in the DEL request

required

Returns:

Type Description
Response

a Response object.

get(params)

Wrap _make_request to make a GET request

Parameters:

Name Type Description Default
params dict

a dictionary of parameters that are passed in the GET request

required

Returns:

Type Description
Response

a Response object.

make_url()

Compose the full URL.

patch(params)

Wrap _make_request to make a PATCH request

Parameters:

Name Type Description Default
params dict

a dictionary of parameters that are passed in the PATCH request

required

Returns:

Type Description
Response

a Response object.

post(params)

Wrap _make_request to make a POST request

Parameters:

Name Type Description Default
params dict

a dictionary of parameters that are passed in the POST request

required

Returns:

Type Description
Response

a Response object.

put(params)

Wrap _make_request to make a PUT request

Parameters:

Name Type Description Default
params dict

a dictionary of parameters that are passed in the PUT request

required

Returns:

Type Description
Response

a Response object.