gocarrot 0.0.3 → 0.0.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/lib/{carrot.rb → gocarrot.rb} +7 -7
- metadata +4 -5
@@ -25,7 +25,7 @@ class Carrot
|
|
25
25
|
#
|
26
26
|
# @param app_id [String] Facebook Application Id for your application.
|
27
27
|
# @param app_secret [String] Carrot Application Secret for your application.
|
28
|
-
# @param
|
28
|
+
# @param uuid [String] a per-user unique identifier. We suggest using email address or the Facebook 'third_party_id'. You may also specify `nil` and instead provide a value as you call methods.
|
29
29
|
# @param hostname [String] the hostname to use for Carrot API endpoints.
|
30
30
|
def initialize(app_id, app_secret, uuid = nil, hostname = 'gocarrot.com')
|
31
31
|
@app_id = app_id
|
@@ -36,7 +36,7 @@ class Carrot
|
|
36
36
|
|
37
37
|
# Validate the active, or specified user.
|
38
38
|
#
|
39
|
-
# @param
|
39
|
+
# @param uuid [String] a per-user unique identifier or `nil` for the value of {Carrot#uuid}. We suggest using email address or the Facebook 'third_party_id'.
|
40
40
|
#
|
41
41
|
# @return [Symbol] returns one of: `:authorized`, `:read_only`, `:not_created`, or `:unknown`
|
42
42
|
def validate_user(uuid = @uuid)
|
@@ -61,7 +61,7 @@ class Carrot
|
|
61
61
|
# Add a user to the Carrot service.
|
62
62
|
#
|
63
63
|
# @param access_token [String] the Facebook user access token for the user to add.
|
64
|
-
# @param
|
64
|
+
# @param uuid [String] a per-user unique identifier or `nil` to use the value of {Carrot#uuid}. We suggest using email address or the Facebook 'third_party_id'.
|
65
65
|
#
|
66
66
|
# @return [Symbol] one of: `:authorized`, `:read_only`, `:not_authorized` or `:unknown`
|
67
67
|
def create_user(access_token, uuid = @uuid)
|
@@ -87,7 +87,7 @@ class Carrot
|
|
87
87
|
# Post an achievement to the Carrot service.
|
88
88
|
#
|
89
89
|
# @param achievement_id [String] the achievement identifier.
|
90
|
-
# @param
|
90
|
+
# @param uuid [String, nil] a per-user unique identifier or `nil` to use the value of {Carrot#uuid}. We suggest using email address or the Facebook 'third_party_id'.
|
91
91
|
#
|
92
92
|
# @return [Symbol] one of: `:success`, `:read_only`, `:not_found`, `:not_authorized` or `:unknown`
|
93
93
|
def post_achievement(achievement_id, uuid = @uuid)
|
@@ -98,7 +98,7 @@ class Carrot
|
|
98
98
|
#
|
99
99
|
# @param score [String, Integer] the high score value to post.
|
100
100
|
# @param leaderboard_id [String] the leaderboard identifier to which the score should be posted.
|
101
|
-
# @param
|
101
|
+
# @param uuid [String] a per-user unique identifier or `nil` to use the value of {Carrot#uuid}. We suggest using email address or the Facebook 'third_party_id'.
|
102
102
|
#
|
103
103
|
# @return [Symbol] one of: `:success`, `:read_only`, `:not_found`, `:not_authorized` or `:unknown`
|
104
104
|
def post_highscore(score, leaderboard_id = "", uuid = @uuid)
|
@@ -114,7 +114,7 @@ class Carrot
|
|
114
114
|
# @param object_instance_id [String] the object instance id of the Carrot object type to create or post; use `nil` if you are creating a throw-away object.
|
115
115
|
# @param action_properties [Hash] the properties to be sent along with the Carrot action, or `nil`.
|
116
116
|
# @param object_properties [Hash] the properties for the new object, if creating an object, or `nil`.
|
117
|
-
# @param
|
117
|
+
# @param uuid [String] a per-user unique identifier or `nil` to use the value of {Carrot#uuid}. We suggest using email address or the Facebook 'third_party_id'.
|
118
118
|
#
|
119
119
|
# @return [Symbol] one of: `:success`, `:read_only`, `:not_found`, `:not_authorized` or `:unknown`
|
120
120
|
def post_action(action_id, object_instance_id, action_properties = {}, object_properties = {}, uuid = @uuid)
|
@@ -132,7 +132,7 @@ class Carrot
|
|
132
132
|
#
|
133
133
|
# @param object_type [Symbol] one of: `:game`, `:publisher`, `:achievement`, or `:object`.
|
134
134
|
# @param object_id [String] if `:achievement` or `:object` is specified as `object_type` this is the identifier of the achievement or object.
|
135
|
-
# @param
|
135
|
+
# @param uuid [String] a per-user unique identifier or `nil` to use the value of {Carrot#uuid}. We suggest using email address or the Facebook 'third_party_id'.
|
136
136
|
#
|
137
137
|
# @return [Symbol] one of: `:success`, `:read_only`, `:not_found`, `:not_authorized` or `:unknown`
|
138
138
|
def post_like(object_type, object_id = nil, uuid = @uuid)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gocarrot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
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-
|
12
|
+
date: 2012-12-11 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Interface with your app on http://gocarrot.com
|
15
15
|
email: pat@gocarrot.com
|
@@ -17,7 +17,7 @@ executables: []
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
-
- lib/
|
20
|
+
- lib/gocarrot.rb
|
21
21
|
homepage: http://rubygems.org/gems/gocarrot
|
22
22
|
licenses: []
|
23
23
|
post_install_message:
|
@@ -38,9 +38,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
38
38
|
version: '0'
|
39
39
|
requirements: []
|
40
40
|
rubyforge_project:
|
41
|
-
rubygems_version: 1.8.
|
41
|
+
rubygems_version: 1.8.24
|
42
42
|
signing_key:
|
43
43
|
specification_version: 3
|
44
44
|
summary: Carrot
|
45
45
|
test_files: []
|
46
|
-
has_rdoc:
|