FadssLite

A Ruby gem for communicating with the FADSS REST API

Installation

Add this line to your application's Gemfile:

gem 'fadss_lite'

And then execute:

$ bundle

Or install it yourself as:

$ gem install fadss_lite

Usage

require 'fadss_lite'
api = FadssLite::Api.new("apikey")

Data Register

records = [
  {
    device: "AAA-BBB-0000000000",
    data: [
      at: "20140930013000000",
      temp1: "23.4",
      temp2: "24.1"
    ]
  }
]
api.post_data(records) # => "{\"accept\":\"postPureData14093001000000000000000001\"}"

Contributing

  1. Fork it ( https://github.com/[my-github-username]/fadss_lite/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 a new Pull Request