README.md in databox-2.0.1 vs README.md in databox-2.1.1

- old
+ new

@@ -1,87 +1,106 @@ -# Databox bindings for Ruby +# databox -[![Build Status][travis-badge]][travis] -[![Gem Version](https://badge.fury.io/rb/databox.svg)](https://badge.fury.io/rb/databox) +Databox - the Ruby gem for the Static OpenAPI document of Push API resource -Ruby Gem for [Databox](http://databox.com/) - Mobile Executive Dashboard. +Push API resources Open API documentation +This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 0.4.1 +- Package version: 2.1.1 +- Generator version: 7.6.0 +- Build package: org.openapitools.codegen.languages.RubyClientCodegen + ## Installation -Add this line to your application's Gemfile: +### Build a gem - gem 'databox' +To build the Ruby code into a gem: -And then execute: +```shell +gem build databox.gemspec +``` - $ bundle +Then either install the gem locally: -Or install it yourself as: +```shell +gem install ./databox-2.1.1.gem +``` - $ gem install databox +(for development, run `gem install --dev ./databox-2.1.1.gem` to install the development dependencies) -## Initialisation +or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/). -Before pushing data to Databox you have to initialize it with token. +Finally add this to the Gemfile: -```ruby -Databox.configure do |c| - c.push_token = "YOUR_TOKEN" -end -``` + gem 'databox', '~> 2.1.1' -## Usage +### Install from Git -Pushing data directly to Databox with help of `push` method: +If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile: -```ruby -client = Databox::Client.new + gem 'databox', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git' -client.push(key: 'sales.total', value: 3000) -client.push(key: 'temp.boston', value: 52.0) -client.push(key: 'temp.boston', value: 52.0, date: '2015-01-01 17:00:00') -client.push(key: 'temp.boston', value: 52.0, attributes: { - location: 'boston-south' -}) +### Include the Ruby code directly +Include the Ruby code directly using `-I` as follows: + +```shell +ruby -Ilib script.rb ``` -Inserting multiple matrices with one `insert_all`: +## Getting Started +Please follow the [installation](#installation) procedure and then run the following code: + ```ruby -client = Databox::Client.new +# Load the gem +require 'databox' -client.insert_all [ - {key: 'temp.boston', value: 52}, - {key: 'temp.boston', value: 50, date: '2015-01-01 17:00:00'}, - {key: 'temp.ny', value: 49} -] -``` +# Setup authorization +Databox.configure do |config| + # Configure HTTP basic authorization: basicAuth + config.username = 'YOUR_USERNAME' + config.password = 'YOUR_PASSWORD' +end -Retrieving information from last push with `last_push`: +api_instance = Databox::DefaultApi.new -```ruby -client.last_push +begin + api_instance.data_delete +rescue Databox::ApiError => e + puts "Exception when calling DefaultApi->data_delete: #{e}" +end -# => -#[{ -# "push"=>"{\"data\":[{\"$sales.total\":2000}]}", -# "err"=>"[]", -# "no_err"=>0, -# "datetime"=>"2015-06-05T10:21:23.861Z", -# "keys"=>"[\"132|sales.total\"]" -#}] ``` -## Resources -- [Databox Web App](https://app.databox.com/) -- [Databox Developers Portal](https://developers.databox.com/) +## Documentation for API Endpoints -## Author & License -- [Oto Brglez](https://github.com/otobrglez) -- [Vlada Petrović](https://github.com/VladaPetrovic) +All URIs are relative to *https://push.databox.com* -## License -- Comes with `MIT` license and terms. +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*Databox::DefaultApi* | [**data_delete**](docs/DefaultApi.md#data_delete) | **DELETE** /data | +*Databox::DefaultApi* | [**data_metric_key_delete**](docs/DefaultApi.md#data_metric_key_delete) | **DELETE** /data/{metricKey} | +*Databox::DefaultApi* | [**data_post**](docs/DefaultApi.md#data_post) | **POST** /data | +*Databox::DefaultApi* | [**metrickeys_get**](docs/DefaultApi.md#metrickeys_get) | **GET** /metrickeys | +*Databox::DefaultApi* | [**metrickeys_post**](docs/DefaultApi.md#metrickeys_post) | **POST** /metrickeys | +*Databox::DefaultApi* | [**ping_get**](docs/DefaultApi.md#ping_get) | **GET** /ping | -[travis-badge]: https://secure.travis-ci.org/databox/databox-ruby.png?branch=v2 -[travis]: http://travis-ci.org/databox/databox-ruby + +## Documentation for Models + + - [Databox::ApiResponse](docs/ApiResponse.md) + - [Databox::PushData](docs/PushData.md) + - [Databox::PushDataAttribute](docs/PushDataAttribute.md) + - [Databox::State](docs/State.md) + + +## Documentation for Authorization + + +Authentication schemes defined for the API: +### basicAuth + +- **Type**: HTTP basic authentication +