usercycle 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/README.md +7 -4
- data/lib/usercycle/event.rb +9 -8
- data/lib/usercycle/version.rb +1 -1
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -28,10 +28,13 @@ identity = 'john.smith@example.com' #required
|
|
28
28
|
### Creating an event
|
29
29
|
|
30
30
|
```ruby
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
@params = {
|
32
|
+
:identity => 'john.smith@example.com',
|
33
|
+
:action_name => 'signed_up',
|
34
|
+
:occurred_at => '2012-03-01 19:45:54 UTC', #optional
|
35
|
+
:properties => { :first_name => 'John', :last_name => 'Smith' } #optional
|
36
|
+
}
|
37
|
+
@client.event.create(@params)
|
35
38
|
```
|
36
39
|
|
37
40
|
## Full Documentation
|
data/lib/usercycle/event.rb
CHANGED
@@ -13,7 +13,6 @@ module Usercycle
|
|
13
13
|
|
14
14
|
# List events by identity
|
15
15
|
#
|
16
|
-
# client = Usercycle::Client.new(API_KEY)
|
17
16
|
# client.event.find_by_identity('john.smith@example.com')
|
18
17
|
#
|
19
18
|
def find_by_identity(identity, options={})
|
@@ -22,14 +21,16 @@ module Usercycle
|
|
22
21
|
|
23
22
|
# Creating an event
|
24
23
|
#
|
25
|
-
#
|
26
|
-
#
|
24
|
+
# @params = {
|
25
|
+
# :identity => 'john.smith@example.com',
|
26
|
+
# :action_name => 'signed_up',
|
27
|
+
# :occurred_at => '2012-03-01 19:45:54 UTC'
|
28
|
+
# :properties => { :first_name => 'John', :last_name => 'Smith' }
|
29
|
+
# }
|
30
|
+
# @client.event.create(@params)
|
27
31
|
#
|
28
|
-
def create(
|
29
|
-
options = { :body =>
|
30
|
-
:identity => identity,
|
31
|
-
:action_name => action,
|
32
|
-
:properties => properties }}
|
32
|
+
def create(params)
|
33
|
+
options = { :body => params }
|
33
34
|
@client.class.post('/events.json', options)
|
34
35
|
end
|
35
36
|
end
|
data/lib/usercycle/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: usercycle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-03-02 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
16
|
-
requirement: &
|
16
|
+
requirement: &70284934175180 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: 0.8.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70284934175180
|
25
25
|
description: Ruby Libray for interating with the USERCycle API
|
26
26
|
email:
|
27
27
|
- calebawoods@gmail.com
|