mixpanel_client 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -19,3 +19,4 @@ rdoc
19
19
  pkg
20
20
 
21
21
  ## PROJECT::SPECIFIC
22
+ test/
data/README.md CHANGED
@@ -7,6 +7,7 @@ Ruby access to the [Mixpanel](http://mixpanel.com/) web analytics tool.
7
7
 
8
8
  ## Example Usage
9
9
  require 'rubygems'
10
+ require 'json'
10
11
  require 'mixpanel_client'
11
12
 
12
13
  config = {:api_key => 'changeme', :api_secret => 'changeme'}
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.2.4
@@ -29,9 +29,10 @@ module Mixpanel
29
29
  def request(endpoint, meth, params)
30
30
  params[:api_key] = api_key
31
31
  params[:expire] = Time.now.to_i + 600 # Grant this request 10 minutes
32
- params[:sig] = hash_args(params)
33
32
  params[:format] ||= @format
33
+ params[:sig] = hash_args(params)
34
34
 
35
+ @sig = params[:sig]
35
36
  @format = params[:format]
36
37
 
37
38
  response = get(mixpanel_uri(endpoint, meth, params))
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mixpanel_client}
8
- s.version = "0.2.3"
8
+ s.version = "0.2.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Keolo Keagy"]
12
- s.date = %q{2010-01-19}
12
+ s.date = %q{2010-01-31}
13
13
  s.description = %q{Simple ruby client interface to the Mixpanel API.}
14
14
  s.email = %q{keolo@dreampointmedia.com}
15
15
  s.extra_rdoc_files = [
@@ -39,7 +39,8 @@ Gem::Specification.new do |s|
39
39
  s.summary = %q{Ruby Mixpanel API Client Library}
40
40
  s.test_files = [
41
41
  "spec/mixpanel_client_spec.rb",
42
- "spec/spec_helper.rb"
42
+ "spec/spec_helper.rb",
43
+ "test/manual.rb"
43
44
  ]
44
45
 
45
46
  if s.respond_to? :specification_version then
data/test/manual.rb ADDED
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "#{File.dirname(__FILE__)}/../lib/mixpanel_client"
4
+ require 'rubygems'
5
+ require 'json'
6
+
7
+ config = {:api_key => 'e81de686c96261747fdc443d4809c297', :api_secret => '201ff82db5f1e8766b0004f0acf8d82e'}
8
+
9
+ api = Mixpanel::Client.new(config)
10
+
11
+ data = api.request(:events, :general, {
12
+ :event => '["test-event"]',
13
+ :unit => 'hour',
14
+ :interval => 24
15
+ })
16
+
17
+ puts api.inspect
18
+ puts data.inspect
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mixpanel_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keolo Keagy
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-19 00:00:00 -08:00
12
+ date: 2010-01-31 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -87,3 +87,4 @@ summary: Ruby Mixpanel API Client Library
87
87
  test_files:
88
88
  - spec/mixpanel_client_spec.rb
89
89
  - spec/spec_helper.rb
90
+ - test/manual.rb