Class: ButterCMS::Requests::Get

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

Class Method Summary collapse

Class Method Details

.call(path, options = {}) ⇒ RestClient::Response

Returns response from the request to the given API endpoint

Returns:

  • (RestClient::Response)

10
11
12
13
14
15
16
17
18
# File 'lib/butter_cms/requests/get.rb', line 10

def self.call(path, options = {})
  full_url = [
    ::ButterCMS::Requests::API::URL,
    path,
    ::ButterCMS::UrlParamsService.call(options)
  ].join

  ::RestClient.get(full_url)
end