https://github.com/gorenje/hitfox_coupon_api
https://github.com/gorenje/hitfox_coupon_api
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gorenje/hitfox_coupon_api
- Owner: gorenje
- License: mit
- Created: 2011-08-31T08:02:24.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-05-02T19:32:19.000Z (almost 13 years ago)
- Last Synced: 2024-04-25T13:02:00.536Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 121 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
- License: LICENSE.txt
Awesome Lists containing this project
README
{
}[http://travis-ci.org/gorenje/hitfox_coupon_api]
= hitfox_coupon_api
Simple interface to the HitFox.com coupon API. Audience of this gem are publisher who have
integrated HitFox and wish to interface with HitFox to obtain and send information to deal
coupons being sold.== Installation
Installation is either
gem install hitfox_coupon_api
Or if using bundler, in the Gemfile
gem 'hitfox_coupon_api'
The latest version can be used via github but including git option in the Gemfile:
gem 'hitfox_coupon_api', :git => 'git://github.com/gorenje/hitfox_coupon_api.git'
== Configuration
To configure the gem, you'll need API authentication details from HitFox. Once you have
these, then configuration is a matter of doing:HitfoxCouponApi.configure do |config|
config.api_token = 'your api token'
config.api_secret = 'your api secret'
config.api_version = 'the api version as provided by HitFox.com'
config.api_endpoint = 'the api endpoint as provided by HitFox.com'
endIf using Rails, then this is best done in a config/initializer and perhaps storing the
configuration data in a separate yaml file.== Usage
At the moment, this gem can do one thing but that really well: provide feedback to HitFox
when a coupon has been used.This is done by providing the application id (also generated by HitFox) and the coupon id
that goes from you:HitfoxCouponApi.application('app id from hitfox').coupon('coupon code').used
that's it. But you can also keep the application object around and use it for subsequent
calls:# best done in Rails in an initializer
MyGlobalApplication = HitfoxCouponApi.application('app id from hitfox')... some time later ...
MyGlobalApplication.coupon("fubar").used
MyGlobalApplication.coupon("snafu also").usedOther than that, there is not much else to see here! More features will appear as we develop
them.== Contributing to hitfox_coupon_api
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
* Fork the project
* Start a feature/bugfix branch
* Commit and push until you are happy with your contribution
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.== Copyright
Copyright (c) 2011 Gerrit Riessen. See LICENSE.txt for
further details.