Sha256: 4b235cfa178b1dec11481a19e313921b2a5580ce262663b583a2563957c36550
Contents?: true
Size: 1.43 KB
Versions: 6
Compression:
Stored size: 1.43 KB
Contents
require "losant_rest" client = PlatformRest::Client.new(auth_token: "my_token") result = client.devices.get(applicationId: "myAppId") puts result # Example result # { # "count" => 1, # "items" => [ { # "deviceClass" => "standalone", # "connectionInfo" => { "connected" => 0, "time" => "2016-06-01T17:16:02.324Z" }, # "name" => "Ruby Client Testing", # "creationDate" => "2016-01-31T17:58:57.541Z", # "lastUpdated" => "2016-05-31T14:47:32.288Z", # "id" => "myDevId", # "attributes" => [ # { "name" => "string", "dataType" => "string" }, # { "name" => "number", "dataType" => "number" }, # { "name" => "boolean", "dataType" => "boolean" } # ], # "description" => "", # "_etag" => "\"174-u7/3je4oFyaKGePPbcHLqw\"", # "deviceId" => "myDevId", # "tags" => [], # "applicationId" => "myAppId", # "_type" => "device", # "_links" => { # "application" => { "href" => "/applications/myAppId" }, # "devices" => { "href" => "/applications/myAppId/devices" }, # "self" => { "href" => "/applications/myAppId/devices/myDevId" } # } # } ], # "applicationId" => "myAppId", # "perPage" => 100, # "page" => 0, # "sortField" => "name", # "sortDirection" => "asc", # "totalCount" => 1, # "_type" => "devices", # "_links" => { # "application" => { "href" => "/applications/myAppId" }, # "self" => { "href" => "/applications/myAppId/devices" } # } # }
Version data entries
6 entries across 6 versions & 1 rubygems