Skip to content
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.

ionia-corporation/xively_api_client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XivelyApiClient

Gem for handling xively devices's credentials.

Installation

gem 'xively_api_client'

Usage

Set up environment variables (optional)

XIVELY_USER
XIVELY_PASS
XIVELY_INSTANCE
XIVELY_DOMAIN

Instantiate the client

  client = Xively::ApiClient.new   # will use env variables

  other_client = Xively::ApiClient.new user: "app_username", pass: "app_password", domain: "abc", instance: "123"

List devices

  client.devices

Get a device

  client.device "serial_id_here"

Create a device

  client.create_device "serial_id", batch_id: "1234", queues: [ "readings", "input", "last_will" ]

Destroy a device

  client.destroy "serial_id"

Contributing

  1. Fork it ( http://github.com//xively_api_client/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

Lightweight client for Xively API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages