Sha256: 929d5290dac8a676f0908bb02719e1b1de0653712ddcad3f9db41437eb8241c6
Contents?: true
Size: 1.71 KB
Versions: 1
Compression:
Stored size: 1.71 KB
Contents
# LYBC client [](https://travis-ci.org/artime-advertising/LYBC-ruby) This is a client for The Body Shop Greece LYBC API. It is written in Ruby and has very few dependencies. ## Installation Add this line to your application's Gemfile: ```ruby gem 'LYBC', :git => 'git@github.com:artime-advertising/LYBC-ruby.git' ``` And then execute: $ bundle ## Usage This libary tries to resemble CIP's js (in-browser) client. Construct the client via: ```ruby lybc_client = LYBC::Client.new("session_id") ``` Then make calls: ``` > lybc_client.registerSession => {"action"=>"registerSession", "message"=>"Session expired", "sessionID"=>"session_id", "status"=>1} ``` ### Available methods: ``` ruby > lybc_client.registerSession('session_id') > lybc_client.getAssociation() > lybc_client.getSelectedCoupons() > lybc_client.cashSelectedCoupons() ``` All methods have a bang-ending alternative, ie `lybc_client.getAssociation!` which throws an error in case an error status returns. ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/artime-advertising/LYBC-ruby.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
LYBC-0.1.0 | README.md |