korboard 0.0.5 → 0.0.6
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/Readme.md +8 -7
- data/lib/korboard/client.rb +10 -1
- data/lib/korboard/version.rb +1 -1
- metadata +2 -2
data/Readme.md
CHANGED
@@ -5,26 +5,27 @@ Readme
|
|
5
5
|
Configuration
|
6
6
|
-------------
|
7
7
|
|
8
|
-
This gem is used for interfacing with the Korboard API
|
8
|
+
This gem is used for interfacing with the Korboard API
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
initializers/korboard.rb
|
11
|
+
|
12
|
+
require "korboard"
|
13
|
+
KORBOARD_CLIENT= Korboard::Client.new(:api_secret =>ENV['KORBOARD_SECRET'], :iteration => 1)
|
14
14
|
|
15
15
|
Example Usage
|
16
16
|
-------------
|
17
17
|
|
18
18
|
call
|
19
19
|
|
20
|
-
|
20
|
+
KORBOARD_CLIENT.record_visit(session[:session_id])
|
21
21
|
|
22
22
|
when you record an initial visit from a user
|
23
23
|
|
24
24
|
and
|
25
25
|
|
26
|
-
|
26
|
+
KORBOARD_CLIENT.record_signup(user.id,session[:session_id])
|
27
27
|
|
28
28
|
to record a signup
|
29
29
|
|
30
|
+
|
30
31
|
|
data/lib/korboard/client.rb
CHANGED
@@ -17,6 +17,7 @@ class Korboard::Client
|
|
17
17
|
end
|
18
18
|
|
19
19
|
# can do this for the rest too
|
20
|
+
# parent_user_id => user_id_of_invitor can be passed in the options
|
20
21
|
def record_signup identifier,session_id,options={ }
|
21
22
|
options.merge! :user_profile => { :session_id => session_id , :user_id => identifier}
|
22
23
|
record :signup,@iteration_number,identifier,options
|
@@ -32,8 +33,16 @@ class Korboard::Client
|
|
32
33
|
record :invite,@iteration_number,identifier,options
|
33
34
|
end
|
34
35
|
|
36
|
+
def record_value identifier,options={ }
|
37
|
+
options.merge! :user_profile => { :session_id => identifier }
|
38
|
+
record :value,@iteration_number,identifier,options
|
39
|
+
end
|
35
40
|
|
36
|
-
|
41
|
+
def record_paid identifier,options={ }
|
42
|
+
options.merge! :user_profile => { :session_id => identifier }
|
43
|
+
record :value,@iteration_number,identifier,options
|
44
|
+
end
|
45
|
+
|
37
46
|
def record metric ,iteration_number, identifier, options ={ }
|
38
47
|
data = { :signup => { :identifier => identifier }, :iteration => { :number => iteration_number } }
|
39
48
|
data.merge!(options)
|
data/lib/korboard/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: korboard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-04-18 00:00:00.000000000Z
|
13
13
|
dependencies: []
|
14
14
|
description: This gem allows developers to access the Korboard API from their app
|
15
15
|
using Ruby
|