Module: PeopleDoc::V1

Defined in:
lib/people_doc.rb

Defined Under Namespace

Classes: Client

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_keyObject

Returns the value of attribute api_key.



42
43
44
# File 'lib/people_doc.rb', line 42

def api_key
  @api_key
end

.base_urlObject

Returns the value of attribute base_url.



42
43
44
# File 'lib/people_doc.rb', line 42

def base_url
  @base_url
end

.loggerObject

Returns the value of attribute logger.



42
43
44
# File 'lib/people_doc.rb', line 42

def logger
  @logger
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Configures default PeopleDoc REST APIv1 settings.

Examples:

configuring the client defaults

PeopleDoc::V1.configure do |config|
  config.api_key = 'api_key'
  config.base_url = 'https://api.staging.us.people-doc.com'
  config.logger = Logger.new(STDOUT)
end

using the client

client = PeopleDoc::V1::Client.new

Yields:

  • (_self)

Yield Parameters:

  • _self (PeopleDoc::V1)

    the object that the method was called on



58
59
60
61
# File 'lib/people_doc.rb', line 58

def configure
  yield self
  true
end