Class: GoogleSyncinatorAPIClient::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/google_syncinator_api_client/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_idObject

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

#hostObject

Returns the value of attribute host.



9
10
11
# File 'lib/google_syncinator_api_client/configuration.rb', line 9

def host
  @host
end

#portObject

Returns the value of attribute port.



10
11
12
# File 'lib/google_syncinator_api_client/configuration.rb', line 10

def port
  @port
end

#schemeObject

Returns the value of attribute scheme.



8
9
10
# File 'lib/google_syncinator_api_client/configuration.rb', line 8

def scheme
  @scheme
end

#script_nameObject

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_keyObject

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

#versionObject

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_urlObject



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

#credentialsObject



26
27
28
# File 'lib/google_syncinator_api_client/configuration.rb', line 26

def credentials
  {access_id: access_id, secret_key: secret_key}
end