Class: ButterCMS::UrlParamsService

Inherits:
Object
  • Object
show all
Defined in:
lib/butter_cms/url_params_service.rb

Class Method Summary collapse

Class Method Details

.call(options = {}) ⇒ String

Returns the query part of the request to the API

Returns:

  • (String)


7
8
9
10
11
# File 'lib/butter_cms/url_params_service.rb', line 7

def self.call(options = {})
  options[:auth_token] = ButterCMS.configuration.api_key

  "?" << options.map { |(key, value)| "#{key.to_s}=#{value}" }.join("&")
end