Pushkin
Pushkin is a simple http client for sending various user/system events to Pushkin API endpoint. It's used primarily for logging events in ticketing services.
Installation
Add this line to your application's Gemfile:
gem 'pushkin-logger'
And then execute:
$ bundle install
Basic Usage
client = Pushkin::Client.new(
ENV['PUSHKIN_API_URL'],
ENV['PUSHKIN_API_TOKEN']
)
data = {
log_level: 'info',
action: 'my.action',
properties: { foo: 'bar' }
}
client.push(data)
Advanced
Predefined actions to track orders and tickets sold:
order.intent
coupon.create
coupon.activate
ticket.order
ticket.create
ticket.preregister
ticket.upload
ticket.download
payment.received
Development
After checking out the repo, run bin/setup
to install dependencies. Then, run rake test
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
Contributing
Bug reports and pull requests are welcome on GitLab at https://gitlab.vesputi.com/mobilitybox/pushkin-gem.