get_devices: Get device numbers

Description Usage Arguments Details Value Examples

Description

get_devices Gets device numbers from GAP API.

Usage

1
get_devices(tenant, username, password, uri_string = "")

Arguments

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?

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.

Value

A character vector of device IDs for the appropriate tenant.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
library(dplyr)

tenant <- <tenant>
username <- <username>
password <- <password>

device_list <- get_devices(
tenant, username, password
)

df <- get_messages(
device = device_list[1],
tenant = tenant,
username = username,
password = password
) %>%
simplify_cattle(
device = device_list[1]
)

print(df)

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