Class: Algorithmia::Client
- Inherits:
-
Object
- Object
- Algorithmia::Client
- Defined in:
- lib/algorithmia/client.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
Instance Method Summary collapse
- #algo(endpoint) ⇒ Object
- #dir(endpoint) ⇒ Object
- #file(endpoint) ⇒ Object
-
#initialize(api_key) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(api_key) ⇒ Client
Returns a new instance of Client.
5 6 7 |
# File 'lib/algorithmia/client.rb', line 5 def initialize(api_key) @api_key = api_key end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
3 4 5 |
# File 'lib/algorithmia/client.rb', line 3 def api_key @api_key end |
Instance Method Details
#algo(endpoint) ⇒ Object
9 10 11 |
# File 'lib/algorithmia/client.rb', line 9 def algo(endpoint) Algorithmia::Algorithm.new(self, endpoint) end |
#dir(endpoint) ⇒ Object
17 18 19 |
# File 'lib/algorithmia/client.rb', line 17 def dir(endpoint) Algorithmia::DataDirectory.new(self, endpoint) end |
#file(endpoint) ⇒ Object
13 14 15 |
# File 'lib/algorithmia/client.rb', line 13 def file(endpoint) Algorithmia::DataFile.new(self, endpoint) end |