Class: Procore::Client
- Inherits:
-
Object
- Object
- Procore::Client
- Includes:
- Requestable
- Defined in:
- lib/procore/client.rb
Overview
Main class end users interact with. An instance of a client can call out the Procore API using methods matching standard HTTP verbs #get, #post, #put, #patch, #delete.
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#store ⇒ Object
readonly
Returns the value of attribute store.
Instance Method Summary collapse
-
#initialize(client_id:, client_secret:, store:, options: {}) ⇒ Client
constructor
A new instance of Client.
Methods included from Requestable
#delete, #get, #patch, #post, #put
Constructor Details
#initialize(client_id:, client_secret:, store:, options: {}) ⇒ Client
Returns a new instance of Client.
31 32 33 34 35 36 37 38 39 |
# File 'lib/procore/client.rb', line 31 def initialize(client_id:, client_secret:, store:, options: {}) @options = Procore::Defaults::.merge() @credentials = Procore::Auth::AccessTokenCredentials.new( client_id: client_id, client_secret: client_secret, host: @options[:host], ) @store = store end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
20 21 22 |
# File 'lib/procore/client.rb', line 20 def @options end |
#store ⇒ Object (readonly)
Returns the value of attribute store.
20 21 22 |
# File 'lib/procore/client.rb', line 20 def store @store end |