checkdin 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/checkdin/promotions.rb +25 -1
- data/lib/checkdin/version.rb +1 -1
- metadata +3 -2
data/lib/checkdin/promotions.rb
CHANGED
@@ -26,7 +26,7 @@ module Checkdin
|
|
26
26
|
|
27
27
|
# Get a list of activities for a promotion ordered by the number of votes they have received
|
28
28
|
#
|
29
|
-
# param [Integer] id The ID
|
29
|
+
# param [Integer] id The ID of the promotion
|
30
30
|
# @param [Hash] options
|
31
31
|
# @option options Integer :limit - The maximum number of records to return.
|
32
32
|
# @option options Integer :page - The page of results to return.
|
@@ -38,5 +38,29 @@ module Checkdin
|
|
38
38
|
return_error_or_body(response)
|
39
39
|
end
|
40
40
|
|
41
|
+
# Create a promotion for campaign
|
42
|
+
# param [String] promotion_short_name The promotion_type eg: custom_activity or twitter_activity
|
43
|
+
# param [Integer] campaign_id - The ID of the campaign
|
44
|
+
# param [Hash] promotion - promotion create paramaters
|
45
|
+
# @param [Hash] options
|
46
|
+
# @option options String :title
|
47
|
+
# @option options String :participant_status_message
|
48
|
+
# @option options Hash :custom_activity_node - If custom_activity
|
49
|
+
# @option custom_activity_node String :name
|
50
|
+
# @option options Hash :trigger_schedule
|
51
|
+
# @options trigger_schedule String :winner_picked
|
52
|
+
# @options trigger_schedule String :rewarding
|
53
|
+
# @options trigger_schedule Integer :interval
|
54
|
+
# @option options Hash :reward
|
55
|
+
# @options reward String :type
|
56
|
+
# @options reward Integer :reward_points
|
57
|
+
|
58
|
+
def create_promotion(promotion_short_name, options={})
|
59
|
+
response = connection.post do |req|
|
60
|
+
req.url "promotions/#{promotion_short_name}", options
|
61
|
+
end
|
62
|
+
return_error_or_body(response)
|
63
|
+
end
|
64
|
+
|
41
65
|
end
|
42
66
|
end
|
data/lib/checkdin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: checkdin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -253,8 +253,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
253
253
|
version: '0'
|
254
254
|
requirements: []
|
255
255
|
rubyforge_project:
|
256
|
-
rubygems_version: 1.8.
|
256
|
+
rubygems_version: 1.8.23
|
257
257
|
signing_key:
|
258
258
|
specification_version: 3
|
259
259
|
summary: Ruby gem for interacting with the checkd.in API.
|
260
260
|
test_files: []
|
261
|
+
has_rdoc:
|