Sha256: 45e763aa281534c36e07032894078155d5c85359c3391ebb42f554680f4435b4

Contents?: true

Size: 1.06 KB

Versions: 8

Compression:

Stored size: 1.06 KB

Contents

module Foursquare2
  module Campaigns
    
    # Add a campaign 
    # Details on param options can be found at https://developer.foursquare.com/docs/campaigns/add
    #
    # @param [Hash]  options
    # @option options String :specialId - required (unless the campaignId parameter has been provided). special ID
    # @option options String :groupId - comma-separated list of venue group IDs (either groupId or venueId is required)
    # @option options String :venueId - comma-separated list of venue IDs (either groupId or venueId is required)
    # @option options Integer :endAt - DateTime when the campaign is to be automatically deactivated (seconds since epoch)
    # @option options Integer :startAt - DateTime when the campaign is to be started (seconds since epoch)
    # @option options String :campaignId - ID of an existing campaign to copy. 
    #

    def add_campaign(options={})
      response = connection.post do |req|
        req.url "campaigns/add", options
      end
        return_error_or_body(response, response.body.response.campaign)
    end
    
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
foursquare2-1.9.3 lib/foursquare2/campaigns.rb
foursquare2-1.9.2 lib/foursquare2/campaigns.rb
foursquare2-1.9.1 lib/foursquare2/campaigns.rb
foursquare2-1.9.0 lib/foursquare2/campaigns.rb
foursquare2-1.8.2 lib/foursquare2/campaigns.rb
foursquare2-1.8.1 lib/foursquare2/campaigns.rb
foursquare2-1.8.0 lib/foursquare2/campaigns.rb
foursquare2-1.7.0 lib/foursquare2/campaigns.rb