Module: TransparencyData
- Defined in:
- lib/transparency_data.rb,
lib/transparency_data/client.rb
Defined Under Namespace
Classes: Client
Constant Summary collapse
- VERSION =
"0.0.4".freeze
Class Method Summary collapse
- .api_domain ⇒ Object
- .api_domain=(value) ⇒ Object
- .api_key ⇒ Object
- .api_key=(value) ⇒ Object
- .api_url(endpoint, version = self.api_version) ⇒ Object
- .api_version ⇒ Object
- .api_version=(value) ⇒ Object
- .configure {|_self| ... } ⇒ Object
Class Method Details
.api_domain ⇒ Object
34 35 36 |
# File 'lib/transparency_data.rb', line 34 def self.api_domain @api_domain || "transparencydata.com" end |
.api_domain=(value) ⇒ Object
38 39 40 |
# File 'lib/transparency_data.rb', line 38 def self.api_domain=(value) @api_domain = value end |
.api_key ⇒ Object
26 27 28 |
# File 'lib/transparency_data.rb', line 26 def self.api_key @api_key end |
.api_key=(value) ⇒ Object
30 31 32 |
# File 'lib/transparency_data.rb', line 30 def self.api_key=(value) @api_key = value end |
.api_url(endpoint, version = self.api_version) ⇒ Object
42 43 44 |
# File 'lib/transparency_data.rb', line 42 def self.api_url(endpoint, version = self.api_version) "http://#{self.api_domain}/api/#{version}#{endpoint}.json" end |
.api_version ⇒ Object
18 19 20 |
# File 'lib/transparency_data.rb', line 18 def self.api_version @api_version || "1.0" end |
.api_version=(value) ⇒ Object
22 23 24 |
# File 'lib/transparency_data.rb', line 22 def self.api_version=(value) @api_version = value end |
.configure {|_self| ... } ⇒ Object
13 14 15 16 |
# File 'lib/transparency_data.rb', line 13 def self.configure yield self true end |