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 CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- usercycle (0.0.1)
4
+ usercycle (0.0.2)
5
5
  httparty (>= 0.8.1)
6
6
 
7
7
  GEM
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
- identity = 'john.smith@example.com' #required
32
- action = 'signed_up' #required
33
- properties = { :first_name => 'John', :last_name => 'Smith' } #optional
34
- @client.event.create(identity, action, properties)
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
@@ -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
- # client = Usercycle::Client.new(API_KEY)
26
- # client.event.create('john.smith@example.com', 'signed_up', :first_name => 'John', :last_name => 'Smith'
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(identity, action, properties={})
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
@@ -1,3 +1,3 @@
1
1
  module Usercycle
2
- VERSION = "0.0.2"
2
+ VERSION = "0.1.0"
3
3
  end
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.2
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: &70176435820740 !ruby/object:Gem::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: *70176435820740
24
+ version_requirements: *70284934175180
25
25
  description: Ruby Libray for interating with the USERCycle API
26
26
  email:
27
27
  - calebawoods@gmail.com