Class: GoogleSyncinatorAPIClient::Configuration
- Inherits:
-
Object
- Object
- GoogleSyncinatorAPIClient::Configuration
- Defined in:
- lib/google_syncinator_api_client/configuration.rb
Instance Attribute Summary collapse
-
#access_id ⇒ Object
Returns the value of attribute access_id.
-
#host ⇒ Object
Returns the value of attribute host.
-
#port ⇒ Object
Returns the value of attribute port.
-
#scheme ⇒ Object
Returns the value of attribute scheme.
-
#script_name ⇒ Object
Returns the value of attribute script_name.
-
#secret_key ⇒ Object
Returns the value of attribute secret_key.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
- #base_url ⇒ Object
- #credentials ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
14 15 16 17 18 19 20 |
# File 'lib/google_syncinator_api_client/configuration.rb', line 14 def initialize @scheme = 'https' @host = 'api.biola.edu' @port = nil @script_name = 'google-syncinator' @version = 'v1' end |
Instance Attribute Details
#access_id ⇒ Object
Returns the value of attribute access_id.
5 6 7 |
# File 'lib/google_syncinator_api_client/configuration.rb', line 5 def access_id @access_id end |
#host ⇒ Object
Returns the value of attribute host.
9 10 11 |
# File 'lib/google_syncinator_api_client/configuration.rb', line 9 def host @host end |
#port ⇒ Object
Returns the value of attribute port.
10 11 12 |
# File 'lib/google_syncinator_api_client/configuration.rb', line 10 def port @port end |
#scheme ⇒ Object
Returns the value of attribute scheme.
8 9 10 |
# File 'lib/google_syncinator_api_client/configuration.rb', line 8 def scheme @scheme end |
#script_name ⇒ Object
Returns the value of attribute script_name.
11 12 13 |
# File 'lib/google_syncinator_api_client/configuration.rb', line 11 def script_name @script_name end |
#secret_key ⇒ Object
Returns the value of attribute secret_key.
6 7 8 |
# File 'lib/google_syncinator_api_client/configuration.rb', line 6 def secret_key @secret_key end |
#version ⇒ Object
Returns the value of attribute version.
12 13 14 |
# File 'lib/google_syncinator_api_client/configuration.rb', line 12 def version @version end |
Instance Method Details
#base_url ⇒ Object
22 23 24 |
# File 'lib/google_syncinator_api_client/configuration.rb', line 22 def base_url URI.join(root_url.to_s, "/#{script_name}/", version).to_s end |
#credentials ⇒ Object
26 27 28 |
# File 'lib/google_syncinator_api_client/configuration.rb', line 26 def credentials {access_id: access_id, secret_key: secret_key} end |