Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
SLASH-7 client library for Ruby
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
.travis.yml
Gemfile
LICENSE
README.md
Rakefile
slash7.gemspec

README.md

Slash7

Build Status

Ruby client for SLASH-7.

Installation

Add this line to your application's Gemfile:

gem 'slash7'

And then execute:

$ bundle

Or install it yourself as:

$ gem install slash7

Usage

require 'slash7'
client = Slash7::Client.new('[YOUR TRACKING CODE]')
# Build your own event
# See https://p-lucky.atlassian.net/wiki/display/PUB/Event+log+format for the format.
event = {
  '_event_name' => 'attack',
  '_app_user_id' => 'user100123',
  '_event_params' => {'weapon' => 'long sword'},
  'lv' => 21
}
client.send_data(event)

Add _time key if you want to specify event date. It's useful when you want to send past events for initialization of your project. Value should be formatted as ISO 8601.

event = {
  '_time' => '2012-01-22T09:25:38+09:00',
  # ... and other parameters
}
client.send_data(event)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Something went wrong with that request. Please try again.