lib/campaign_monitor.rb
# Takes a CampaignMonitor API method name and set of parameters; returns the correct URL for the REST API.
Takes a CampaignMonitor API method name and set of parameters; returns the correct URL for the REST API.
Takes a CampaignMonitor API method name and set of parameters ; returns the correct URL for the REST API .
def request_url(method, params={})
    url = "#{@host}#{@api}/#{method}?ApiKey=#{@api_key}"
    params.each_pair do |key, val|
      url += "&#{key}=" + CGI::escape(val.to_s)
    end
    url
  end
def request_url ( method , params = { } ) url = "#{@host}#{@api}/#{method}?ApiKey=#{@api_key}" params . each_pair do | key , val | url += "&#{key}=" + CGI :: escape ( val . to_s ) end url end
Takes a CampaignMonitor API method name and set of parameters; returns the correct URL for the REST API.
Takes a CampaignMonitor API method name and set of parameters ; returns the correct URL for the REST API .
method
<not_specific>
params
<not_specific>