NodePing.Results.get_results
You're seeing just the function
get_results
, go back to NodePing.Results module for more information.
Get results for specified check
Parameters
token
- NodePing API token that was provided with accountid
- Check id of the check you want to getopts
- Optional arguments to filter results. Empty list if no opts.customerid
- optional ID to access a subaccount
The list of values for opts
can be found in NodePing's documents here:
https://nodeping.com/docs-api-results.html#get
Opts
span
- number of hours of results to retrieve. If used in combination with limit the narrower range will be used.limit
- optional integer - number of records to retrieve. Defaults to 300 if span is not set.start
- date/time for the start of the results. Timestamps should be milliseconds, or an RFC2822 or ISO 8601 dateend
- date/time for the end of the results.offset
- integer offset to have the system perform uptime calculations for a different time zone.clean
- boolean sets whether to use the older format for the result record that includes a doc object.true
strongly recommended
Examples
iex> opts = [{:span, 48}, {:limit, 10}]
iex> token = System.fetch_env!("TOKEN")
iex> checkid = "201205050153W2Q4C-0J2HSIRF"
iex> {:ok, results} = NodePing.Results.get_results(token, checkid, opts)