storage.getJSON: Get data object from storage

Description Usage Arguments Value Examples

Description

read data from Bigstream storage via Bigstream storage API This command support on Bigstream version 1.2 or more only

Usage

1
storage.getJSON(storage_name, id = NULL, index = NULL, key = NULL)

Arguments

storage_name

storage name

id

Object id

index

get data by index

key

get data by defined key in storage

Value

data in JSON format from Bigstream storage. Return lastest data if no id, index or key param

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
host <- "http://sample.bigstream.io"
storage_name <- "sample.sensordata"
token <- "token"
bs.connect(host, token)

#return lastest data
storage.getJSON(storage_name)

# return data object 010000000000000258107ea7
storage.getJSON(storage_name,id="010000000000000258107ea7")

# return data index 1 (1st data in storage)
storage.getJSON(storage_name,index=1)

# return data by key defined
storage.getJSON(storage_name,key="")

## End(Not run)

igridproject/Rbigstream documentation built on July 2, 2018, 1:14 a.m.