hats / profitrolly-api-ruby

Обертка над API сервиса Profitrolly

Home Page:https://github.com/hats/profitrolly-api-ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Profitrolly API Ruby

Проект является оберткой над API сервиса Profitrolly.

Установка

Добавьте строку ниже в Gemfile вашего приложения:

gem 'profitrolly-api-ruby', github: 'hats/profitrolly-api-ruby'

После чего выполните команду:

$ bundle

Использование

require 'rubygems'
require 'profitrolly'

# укажите ваши данные здесь
your_token         = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
your_profit_code   = 'ccccccccccccccccccccccccccccc'

# настройте клиент для работы с Profitrolly API
@client = Profitrolly::Client.new(
  token: your_token
)

# активация профита
@client.activate(
  code: your_profit_code
)

# получение статуса профита
@client.available?(code)

Ваш вклад в проект

  1. Форкните репозиторий ( https://github.com/hats/profitrolly-api-ruby/fork )
  2. Создайте ветку для ваших изменений (git checkout -b my-new-feature)
  3. Зафиксируйте ваши изменения (git commit -am 'Add some feature')
  4. Отправьте ваши изменения в репозиторий (git push origin my-new-feature)
  5. Создайте запрос на изменения

ENJOY!

About

Обертка над API сервиса Profitrolly

https://github.com/hats/profitrolly-api-ruby

License:MIT License


Languages

Language:Ruby 100.0%