Sha256: cdd2cb9c6cf146dbe3a43d57f537526a4bcafea2414c5c85c5b4f09b69d44b7d

Contents?: true

Size: 1.88 KB

Versions: 3

Compression:

Stored size: 1.88 KB

Contents

# module ExpressPigeon
#   module API
#     class Campaigns
#       include ExpressPigeon::API
#
#       def initialize
#         @endpoint = 'campaigns'
#       end
#
#       def all
#         get @endpoint
#       end
#
#       def report(campaign_id)
#         get "#{@endpoint}/#{campaign_id}"
#       end
#
#       def bounced(campaign_id)
#         get "#{@endpoint}/#{campaign_id}/bounced"
#       end
#
#       def unsubscribed(campaign_id)
#         get "#{@endpoint}/#{campaign_id}/unsubscribed"
#       end
#
#       def spam(campaign_id)
#         get "#{@endpoint}/#{campaign_id}/spam"
#       end
#
#       #
#       # Schedules a new campaign to be sent.
#       # Parameters:
#       # * *list_id* - id of list to send to
#       # * *template_id* - id of template to send
#       # * *name* - name of a newly created campaign
#       # * *from_name* - from name
#       # * *reply_to* - reply to
#       # * *subject* - subject of campaign
#       # * *google_analytics* - true to turn Google Analytics on
#       def send(params = {})
#         post @endpoint, params
#       end
#
#       #
#       # Schedules a new campaign to be sent.
#       # Parameters:
#       # * *list_id* - id of list to send to
#       # * *template_id* - id of template to send
#       # * *name* - name of a newly created campaign
#       # * *from_name* - from name
#       # * *reply_to* - reply to
#       # * *subject* - subject of campaign
#       # * *google_analytics* - true to turn Google Analytics on
#       # * *schedule_for* - Specifies what time a campaign should be sent. If it is provided the campaign will
#       #                     be scheduled to this time, otherwise campaign is sent immediately. The schedule_for
#       #                     must be in ISO date format and should be in the future.
#       def schedule(params = {})
#         post @endpoint, params
#       end
#     end
#   end
# end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
express_pigeon-2.0.2 lib/express_pigeon/api/campaigns.rb
express_pigeon-2.0.1 lib/express_pigeon/api/campaigns.rb
express_pigeon-2.0.0 lib/express_pigeon/api/campaigns.rb