Class: RelateIq::ServiceFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/relateiq/service_factory.rb

Class Method Summary collapse

Class Method Details

.get_endpoint(endpoint) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/relateiq/service_factory.rb', line 3

def self.get_endpoint(endpoint)
  RestClient::Resource.new(
    "#{RelateIq.configuration.base_url}/#{endpoint}",
    user: RelateIq.configuration.username,
    password: RelateIq.configuration.password,
    headers: { content_type: :json, accept: :json }
  )
end