This is the client providing the lowest level of abstraction.
Ckan low-level client.
Wrapper around requests.request().
Extra functionality provided:
Parameters: |
|
---|---|
Raises ckan_api_client.exceptions.HTTPError: | |
in case the HTTP request returned a non-ok status code |
|
Returns: | a requests response object |
Get a dataset, using API v2
Parameters: | dataset_id – ID of the requested dataset |
---|---|
Returns: | a dict containing the data as returned from the API |
Return type: | dict |
POST a dataset, using API v2 (usually for creation)
Parameters: | dataset (dict) – a dict containing data to be sent to Ckan. Should not already contain an id |
---|---|
Returns: | a dict containing the data as returned from the API |
Return type: | dict |
PUT a dataset, using API v2 (usually for update)
Parameters: | dataset (dict) – a dict containing data to be sent to Ckan. Must contain an id, that will be used to build the URL |
---|---|
Returns: | a dict containing the updated dataset as returned from the API |
Return type: | dict |