<commit_before>[![Build Status](https://travis-ci.org/eder/apontador_oauth2.png?branch=master)](https://travis-ci.org/eder/apontador_oauth2)
# ApontadorOauth2
Ruby client for the OAuth 2.0 to site Apontador, still in process of development. 
## Installation

Add this line to your application's Gemfile:

    gem 'apontador_oauth2'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install apontador_oauth2

## Usage Examples
 
Get Token with app trust:
```ruby
client =  ApontadorOauth2::Client.new({:client_id => "12345", 
                                       :client_secret => "54321", 
                                       :url => "https://api.apontador.com.br/v2/"})

client.token
#=> one-number-token-valid
```
##Supported Ruby Versions

This library aims to support and is tested against the following Ruby implementations:
Ruby 1.9.2
Ruby 1.9.3
Ruby 2.0.0

## Contributing

1. Fork it
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
<commit_msg>Added example of use user authenticate<commit_after>[![Build Status](https://travis-ci.org/eder/apontador_oauth2.png?branch=master)](https://travis-ci.org/eder/apontador_oauth2)
# ApontadorOauth2
Ruby client for the OAuth 2.0 to site Apontador, still in process of development. 
## Installation

Add this line to your application's Gemfile:

    gem 'apontador_oauth2'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install apontador_oauth2

## Usage Examples
 
Get Token with app trust:
```ruby
client = ApontadorOauth2::Client.new({:client_id     => "12345", 
                                      :client_secret => "54321", 
                                      :url           => "https://api.apontador.com.br/v2/"
                                     })

client.token
#=> one-number-token-valid
```

Get token with user authenticate:
``` ruby
client = ApontadorOauth2::Client.new({:client_id   => "12345",
                                      :client_secret => "54321",
                                      :url           => "https://api.apontador.com.br/v2/",
                                      :username      => "<EMAIL>",
                                      :password      => "<PASSWORD>",
                                      :grant_type    => "password"
                                    })
client.token
#=> one-number-token-valid-authenticate-be-user
```
##Supported Ruby Versions

This library aims to support and is tested against the following Ruby implementations:
Ruby 1.9.2
Ruby 1.9.3
Ruby 2.0.0

## Contributing

1. Fork it
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

{'fraction_non_alphanumeric': 0.11202185792349727, 'fraction_numerical': 0.02663934426229508, 'mean_word_length': 2.218681318681319, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 20, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1132069', 'n_tokens_mistral': 946, 'n_tokens_neox': 850, 'n_words': 256}