Module: Cloudsight
- Defined in:
- lib/cloudsight.rb
Defined Under Namespace
Classes: Request, Response, ResponseException, UnexpectedResponseException, Util
Constant Summary
collapse
- BASE_URL =
'https://api.cloudsight.ai'
Class Method Summary
collapse
Class Method Details
.api_key ⇒ Object
25
26
27
|
# File 'lib/cloudsight.rb', line 25
def api_key
@@api_key if defined?(@@api_key)
end
|
.api_key=(val) ⇒ Object
21
22
23
|
# File 'lib/cloudsight.rb', line 21
def api_key=(val)
@@api_key = val
end
|
.base_url ⇒ Object
37
38
39
|
# File 'lib/cloudsight.rb', line 37
def base_url
@@base_url ||= BASE_URL
end
|
.base_url=(val) ⇒ Object
33
34
35
|
# File 'lib/cloudsight.rb', line 33
def base_url=(val)
@@base_url = val
end
|
.oauth_options ⇒ Object
29
30
31
|
# File 'lib/cloudsight.rb', line 29
def oauth_options
@@oauth_options if defined?(@@oauth_options)
end
|
.oauth_options=(val) ⇒ Object
14
15
16
17
18
19
|
# File 'lib/cloudsight.rb', line 14
def oauth_options=(val)
raise RuntimeError.new("Could not load the simple_oauth gem. Install it with `gem install simple_oauth`.") unless defined?(SimpleOAuth::Header)
val = val.inject({}) {|memo, (k, v)| memo[k.to_sym] = v; memo }
@@oauth_options = val
end
|