Project

oneview

0.0
No commit activity in last 3 years
No release in over 3 years
The goal of this gem is to simplify the access to Oneview API (http://www.oneview.com.br/), for more information about this API, visit: http://coyosoftware.github.io/
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.6

Runtime

~> 0.13
 Project Readme

Oneview

Build Status Gem Version Test Coverage Code Climate

This gem simplifies the usage of Oneview API

For more information regarding the API, visit the documentation

Installation

Add this line to your application's Gemfile:

gem 'oneview'

And then execute:

$ bundle

Or install it yourself as:

$ gem install oneview

Usage

Create a new instance of Oneview class passing your access token:

	client = Oneview.new(YOUR_ACCESS_TOKEN)

With the client instance, you can access the following resources:

  • Contacts (client.contacts) Create and Update
  • Sms Sending (client.sms)
  • Email Sending (client.email)

Using the resources

Creating new records

All resources implement a create method.

It can accept a hash with the parameters as described in the API documentation or an Entity object that reflects the API fields.

Currently the following entities are implemented:

Updating records

It can accept a hash with the parameters as described in the API documentation or an Entity object that reflects the API fields.

Currently the following entities are implemented:

Reading the response

All methods return an Oneview::Client::Response object. This objects contains the following attributes:

	response = Oneview.new(YOUR_ACCESS_TOKEN).contacts.create(contact_entity)
	
	response.status			# Contains the status code of the request
	response.payload		# Contains the return data (JSON) of the request
	response.raw_response	# Contains the HTTParty response object

Contributing

  1. Fork it ( https://github.com/coyosoftware/oneview/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