get_messages: Get GPS data

Description Usage Arguments Details Value Examples

Description

get_devices Gets device numbers from GAP API.

Usage

1
get_messages(device, tenant, username, password, filter_string = "")

Arguments

device

device number retried from get_devices.

tenant

The tenant code required for access to the GAP API. This is provided by CoSignal support.

username

Username used to access the ninja tracking control panel.

password

Password used to access the ninjac tracking control panel. removed?

filter_string

Additional filter string that can be added to the uri string. This will be appended to the end of the http string an uses the standard verbs defined by the open api (http://www.odata.org/documentation/odata-version-2-0/uri-conventions/) and implemented in the GAP API (https://developer.globalalerting.com/API?item=ThingsToKnow)

Details

This is a wrapper function for httr::GET which makes use of format_uri to formulate the correct uri string, and jsonlite::fromJSON to parse the incoming json, and output a character vector. This function is called repeatedly by gapAPI::get_GPS, but can be called individually to get a full dataframe without simplification.

Value

An object of class response from the httr package which can be passed to gapAPI::simplify_cattle for conversion to a data.frame.

Examples

1
2
3
4
5
6
7
messages <- get_messages <- function(
device = <device>,
tenant = <tenant-code>,
username = <username>,
password = <password>
)
print(messages)

maupson/gapAPI documentation built on May 21, 2019, 1:37 p.m.