pub async fn call_api_endpoint<'a, R: DeserializeOwned>(
api_key: &String,
endpoint: CCAPIEndpoint,
unit: CCUnit,
params: Vec<Param<'a>>,
additional_params: Option<String>,
) -> Result<R, Error>
Expand description
Constructs a URL for API request, sends the request, and returns the deserialzied response.
ยงInput
api_key
: CCData API keyendpoint
: Enum that represents the CCData API endpoint for function to send the request tounit
: Unit for data to be binned by (e.g.,Day
,Hour
)params
: List of parameters expected by the CCData API endpointadditional_params
: Additional parameters to add to the request