Sendgrid Threads

Ruby Gem for the SendGrid Threads API threads.io/

This Gem allows you to send Threads events using native Ruby. For more details, read: docs.threads.io/

Status

Installation

Add this line to your application’s Gemfile:

gem 'sendgrid-threads'

And then execute:

$ bundle

Or install it yourself using:

$ gem install sendgrid-threads

Usage

# config/initializers/sendgrid_threads.rb
SendgridThreads.configure do |config|
  config.key = 'my_api_key'
end
api = SendgridThreads::Api.new

# identify user
api.identify("unique_user_id", {email: "user@example.com", other: "parameters"})

# track event
api.track("unique_user_id", "Event name", {any: "custom", user: "properties"})

# track page view
api.page_view("unique_user_id", "Page name", {any: "custom", user: "properties"})

# remove user
api.remove("unique_user_id")

Contributing to sendgrid-threads

Copyright © 2015 David Paluy. See LICENSE.txt for further details.