<commit_before># Kounta

Allows easy access to the Kounta POS RESTful API.

## Installation

Add this line to your application's Gemfile:

    gem 'kounta'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install kounta

## Usage

    require 'kounta'

Then add your API details / other configuration options

Kounta.configure do |config|
    config.client_id = "abcd1234"
    config.client_secret = "<KEY>"
    config.client_token = "<KEY>"
    config.client_refresh_token = "<KEY>"
end

You may also enable / disable logging (disabled by default)

    config.enable_logging = true

Use the gem by creating a Kounta company object:

    company = Kounta::Company.new

This will automatically download data about the company associated with your authentication details.

From here you can start to fetch relationships of that data, e.g. for all the sites belonging to your company

    sites = company.sites

For the products belonging to a site

    sites.first.products

Please see the test sweet for full details of these.

## Contributing<commit_msg>Update readme with instructions on using the console.<commit_after># Kounta

Allows easy access to the Kounta POS RESTful API.

## Installation

Add this line to your application's Gemfile:

    gem 'kounta'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install kounta

## Usage

    require 'kounta'

Then add your API details / other configuration options

Kounta.configure do |config|
    config.client_id = "abcd1234"
    config.client_secret = "<KEY>"
    config.client_token = "<KEY>"
    config.client_refresh_token = "<KEY>"
end

You may also enable / disable logging (disabled by default)

    config.enable_logging = true

Use the gem by creating a Kounta company object:

    company = Kounta::Company.new

This will automatically download data about the company associated with your authentication details.

From here you can start to fetch relationships of that data, e.g. for all the sites belonging to your company

    sites = company.sites

For the products belonging to a site

    sites.first.products

Please see the test sweet for full details of these.

### Console

To aid debugging their is an interactive console. To get started, you'll need to create a "tokens.yml" file in the root of gem, like:

    client_id: abcd1234
    client_secret: <KEY>
    client_token: <KEY>
    client_refresh_token: <KEY>

Then run:

    ruby console.rb

Get started by creating a Kounta::Company object (see above for detailed usage).

## Contributing
{'fraction_non_alphanumeric': 0.06284153005464481, 'fraction_numerical': 0.00468384074941452, 'mean_word_length': 3.618018018018018, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '3761422', 'n_tokens_mistral': 746, 'n_tokens_neox': 706, 'n_words': 319}