Sha256: 802dd534e76b18530bf507c8920d8fe1608f45757ddc3133139fdbc0ff6cfcaf

Contents?: true

Size: 1.14 KB

Versions: 1

Compression:

Stored size: 1.14 KB

Contents

# Tracksale
Tracksale v2 API integration gem.

## Install

1. Add `gem 'tracksale', github: 'estudar/tracksale'` into your Gemfile.
2. run `bundle install`

## Configure

You must generate a Tracksale key on tracksale.co website and configure it on rails you can use an initializer.

config/initializers/tracksale.rb
```
Tracksale.configure do |config|
  config.key = 'YOUR_KEY_HERE'
end
```

Key generation instructions can be found on the official documentation at: https://api.tracksale.co/?lang=en#submenu1
## Using

After configuration you should be able to use it easily as in
```
Tracksale::Campaign.find_by_name('foobar') => #<Tracksale::Campaign:0x00559c458ec128
 @code=123,
 @name="foobar",
 @score={:detractors=>1, :passives=>2, :promoters=>3}>
```

## Debug

You can enable the HTTParty debug on the request by using the '-d' option on IRB or Ruby

## Limitations

This gem is on early stages of development and you will only be able to:

* Find campaigns by name ( `Tracksale::Campaign.find_by_name(name)` )
* List all campaigns ( `Tracksale::Campaign.all` )

Also you can only access 5 items from a campaign (name, code, detractors, passives and promoters).

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tracksale-0.0.1 README.md