Skip to contents

Provides the end-to-end queries required to update all details about the live acoustic telemetry system in place

Public fields

base_url

string containing the base url of the querying API (without the end_point) part

headers

list of HTTP headers

token

string to authenticate against the API

Active bindings

base_url

string containing the base url of the querying API (without the end_point) part

Methods


Method new()

Initialise IIMApiClient

Usage

IIMApiClient$new(api_url, headers, token)

Arguments

headers

list of HTTP headers

token

string to authenticate against the API

base_url

string containing the base url of the querying API (without the end_point) part


Method post_data_to_api()

Post a nested list to the database through an API.

Usage

IIMApiClient$post_data_to_api(obj, end_point)

Arguments

obj

a nested list resulting from applying NestedListBuilder

end_point

string with the name of the end point being queried. Default "tags_with_sensors/"


Method delete_data_from_api()

Delete a single record from the database through the API

Usage

IIMApiClient$delete_data_from_api(obj, end_point)

Arguments

obj

a flat list with the ids or any unique field that identifies the record to be erased

end_point

string with the name of the end point being queried. Default "tags_with_sensors/"


Method get_from_api()

Make a request to the API and return the data in a json object.

Usage

IIMApiClient$get_from_api(end_point, parameters = NULL)

Arguments

end_point

string with the name of the end point being queried. Default "tags_with_sensors/"

obj

a nested list resulting from applying NestedListBuilder


Method get_from_api_as_dataframe()

Usage

IIMApiClient$get_from_api_as_dataframe(end_point, parameters = NULL)


Method clone()

The objects of this class are cloneable with this method.

Usage

IIMApiClient$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.