Module: UrlHelper

Included in:
Eloqua::Api::Base, Eloqua::Api::Client
Defined in:
lib/helper/url_helper.rb

Instance Method Summary collapse

Instance Method Details

#extend_params_to_url(endpoint:, query_params:, search_params:) ⇒ Object



10
11
12
# File 'lib/helper/url_helper.rb', line 10

def extend_params_to_url(endpoint:, query_params:, search_params:)
  "#{endpoint}?#{query_params_string(query_params)}#{search_params_string(search_params)}"
end

#sub_api_version(url:) ⇒ Object



2
3
4
# File 'lib/helper/url_helper.rb', line 2

def sub_api_version(url:)
  url.gsub(/{version}/, DEFAULT_API_VERSION)
end

#sub_id_in_endpoint(endpoint, id) ⇒ Object



6
7
8
# File 'lib/helper/url_helper.rb', line 6

def sub_id_in_endpoint(endpoint, id)
  endpoint.gsub(/{id}/, id.to_s)
end