Ruby wrapper for the Gimmie API for sending Events and retrieving owned Stamp Cards.
Add this line to your application's Gemfile:
gem 'gimmie_api', github: 'gimmie/ruby'And then execute:
$ bundle
Set the client key, secret, and api url by doing:
GimmieAPI.client_key = 'yourclientkey'
GimmieAPI.client_secret = 'yourclientsecret'
GimmieAPI.api_root = 'http://instancename.gimmie.io' # replace instancename with your instance nameOptionally, you can change the Faraday adapter, by default it is:
GimmieAPI.faraday_adapter = Faraday.default_adapterWhich should work just fine for most use cases but if you have a special use case, see the Faraday documentation.
See the specs for examples, but basically:
response = GimmieAPI::Client.new(uid: uid).trigger('name_of_event', {'user_property_name' => 'user_property_value', ...})
response.success? # basic faraday response objectThe gem is available as open source under the terms of the MIT License.