<commit_before># TinyerpRuby

[![Build Status](https://travis-ci.org/detierno/dice.svg?branch=master)](https://travis-ci.org/detierno/dice)
[![Code Climate](https://codeclimate.com/github/locomotivapro/tinyerp_ruby.png)](https://codeclimate.com/github/locomotivapro/tinyerp_ruby)

Gem for integration with [TinyERP](http://www.tiny.com.br) API.

## Installation

Add this line to your application's Gemfile:

    gem 'tinyerp_ruby'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install tinyerp_ruby

## Usage

In first place you need an account in TinyERP. This gem iis just a
wrapper to make calls to TinyERP api (v2) using a ruby hash and
parsing the response as a ruby hash object.

Start creating a connection with you api key, by default it will be started in production env but you can provide another env in connection initialization.

    connection = tinyerpRuby::Connection.new 'yourawesomeapikey'

Then we create a service object.

    poster = TinyerpRuby::Service.new connection

With service object created we just need to call the api methods and pass a hash according api description.

    params = {....}
    return_params = poster.pesquisar_vendedores_service(params)<commit_msg>Corrected<commit_after># TinyerpRuby

[![Build Status](https://travis-ci.org/detierno/dice.svg?branch=master)](https://travis-ci.org/detierno/dice)
[![Code Climate](https://codeclimate.com/github/locomotivapro/tinyerp_ruby.png)](https://codeclimate.com/github/locomotivapro/tinyerp_ruby)

Gem for integration with [TinyERP](http://www.tiny.com.br) API.

## Installation

Add this line to your application's Gemfile:

    gem 'tinyerp_ruby'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install tinyerp_ruby

## Usage

In first place you need an account in TinyERP. This gem iis just a
wrapper to make calls to TinyERP api (v2) using a ruby hash and
parsing the response as a ruby hash object.

Start creating a connection with you api key, by default it will be started in production env but you can provide another env in connection initialization.

    connection = TinyerpRuby::Connection.new 'yourawesomeapikey'

Then we create a service object.

    poster = TinyerpRuby::Service.new connection

With service object created we just need to call the api methods and pass a hash according api description.

    params = {....}
    return_params = poster.pesquisar_vendedores_service(params)
{'fraction_non_alphanumeric': 0.08681408681408681, 'fraction_numerical': 0.000819000819000819, 'mean_word_length': 4.369230769230769, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3154149', 'n_tokens_mistral': 782, 'n_tokens_neox': 720, 'n_words': 259}