storage.get: 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
2
storage.get(storage_name, id = NULL, index = NULL, key = NULL,
  flatten = TRUE)

Arguments

storage_name

storage name

id

Object id

index

get data by index

key

get data by defined key in storage

flatten

return in JSON format if this param is FALSE

Value

data 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.get(storage_name)

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

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

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

## End(Not run)

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