<commit_before># ClientSuccess Ruby Client

This is an unofficial wrapper for the [ClientSuccess
Open API](http://docs.clientsuccessapi.apiary.io/).

This wrapper currently supports the API endpoints for
authentication, clients, and contacts. Pull requests
for other areas of the API very welcomed!

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'client_success_ruby_client'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install client_success_ruby_client

## Usage

Instantiate a client object using your ClientSuccess
email and password:

```ruby
api = ClientSuccess::ApiClient.new(email: '<EMAIL>',
                                   password: '<PASSWORD>')
```

You can then use the client to access all available endpoints:

```ruby
clients = api.all_clients
# => array of all ClientSuccess clients
client = api.first
# => a ClientSuccess::Resources::Client object
client.external_id
# => the client's externalId (note how accessor method is snake-cased)
```

All available API methods are well documented in the modules under
the ClientSuccess::Api namespace. The quick and dirty is documented
below.<commit_msg>Update README re gem installation<commit_after># ClientSuccess Ruby Client

This is an unofficial wrapper for the [ClientSuccess
Open API](http://docs.clientsuccessapi.apiary.io/).

This wrapper currently supports the API endpoints for
authentication, clients, and contacts. Pull requests
for other areas of the API very welcomed!

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'client_success_ruby_client',
    git: 'git://github.com/LawKick/client_success_ruby_client.git'
```

And then execute:

    $ bundle

## Usage

Instantiate a client object using your ClientSuccess
email and password:

```ruby
api = ClientSuccess::ApiClient.new(email: '<EMAIL>',
                                   password: '<PASSWORD>')
```

You can then use the client to access all available endpoints:

```ruby
clients = api.all_clients
# => array of all ClientSuccess clients
client = clients.first
# => a ClientSuccess::Resources::Client object
client.external_id
# => the client's externalId (note how accessor method is snake-cased)
```

All available API methods are well documented in the modules under
the ClientSuccess::Api namespace. The quick and dirty is documented
below.
{'fraction_non_alphanumeric': 0.08389544688026981, 'fraction_numerical': 0.0, 'mean_word_length': 4.3931818181818185, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1234108', 'n_tokens_mistral': 666, 'n_tokens_neox': 623, 'n_words': 259}