mixpanel_client 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/README.md +1 -0
- data/VERSION +1 -1
- data/lib/mixpanel_client.rb +2 -1
- data/mixpanel_client.gemspec +4 -3
- data/test/manual.rb +18 -0
- metadata +3 -2
data/.gitignore
CHANGED
data/README.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.4
|
data/lib/mixpanel_client.rb
CHANGED
@@ -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))
|
data/mixpanel_client.gemspec
CHANGED
@@ -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.
|
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-
|
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.
|
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-
|
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
|