<commit_before># Kelkoo

A small wrapper around Kelkoo API. This is **work in progress!**.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'kelkoo', github: 'voke/kelkoo'
```

## Usage

#### Configure
```ruby
Kelkoo.configure do |config|
  config.partner_id = "123"
  config.partner_key = "abc123"
  config.market = "se"
end
```

You don't have to use the configure block. Default credentials are loaded
automatically from env variables: `ENV['KELKOO_ID']`, `ENV['KELKOO_KEY']`
and `ENV['KELKOO_MARKET']`.

#### Products
```ruby
products = Kelkoo::Product.where(query: 'iphone', brandName: 'apple')
products = products.limit(10).where(merchantId: 11853713)<commit_msg>Change README to make more sense<commit_after># Kelkoo

A small wrapper around Kelkoo API. This is **work in progress!**.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'kelkoo', github: 'voke/kelkoo'
```

## Usage

#### Configure
```ruby
Kelkoo.configure do |config|
  config.partner_id = "123"
  config.partner_key = "abc123"
  config.market = "se"
end
```

You don't have to use the configure block. Default credentials are loaded
automatically from env variables: `ENV['KELKOO_ID']`, `ENV['KELKOO_KEY']`
and `ENV['KELKOO_MARKET']`.

#### Products
Build request object using chainable scopes.
```ruby
products = Kelkoo::Product.where(query: 'iphone', brandName: 'apple').limit(10)

if merchant_id
  products = products.where(merchantId: merchant_id)
end
{'fraction_non_alphanumeric': 0.14382174206617152, 'fraction_numerical': 0.016205266711681297, 'mean_word_length': 5.471615720524017, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '7260280', 'n_tokens_mistral': 546, 'n_tokens_neox': 504, 'n_words': 151}