Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #14 from rsbrown/master

added support for 'events' option required by new 'arb_funnels' api endpoint
  • Loading branch information...
commit b5a3ad1e1e79df6f5086fae18225ab48dc621f1b 2 parents 1f81867 + d139d14
@keolo authored
View
4 lib/mixpanel/client.rb
@@ -16,8 +16,8 @@ class Client
attr_accessor :api_key, :api_secret
# Available options for a Mixpanel API request
- OPTIONS = [:resource, :event, :funnel_id, :name, :type, :unit, :interval, :limit, :format, :bucket,
- :values, :from_date, :to_date, :on, :where, :buckets, :timezone]
+ OPTIONS = [:resource, :event, :events, :funnel_id, :name, :type, :unit, :interval, :limit,
+ :format, :bucket, :values, :from_date, :to_date, :on, :where, :buckets, :timezone]
# Dynamically define accessor methods for each option
OPTIONS.each do |option|
View
3  spec/mixpanel_client/mixpanel_client_spec.rb
@@ -105,10 +105,11 @@
on 'properties["product_id"]'
where '1 in properties["product_id"]'
buckets '5'
+ events [{"event" => "page:view"}, {"event" => "button:click"}].to_json
end
Mixpanel::Client::OPTIONS.each do |option|
- @client.send(option).should_not be_nil
+ @client.send(option).should_not be_nil, "#{option} option was nil"
end
@client.request do

0 comments on commit b5a3ad1

Please sign in to comment.
Something went wrong with that request. Please try again.