Class: PredicsisMlSdk::DataFile
- Inherits:
-
Object
- Object
- PredicsisMlSdk::DataFile
show all
- Includes:
- Util
- Defined in:
- lib/predicsis_ml_sdk/data_file.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Util
#define_attributes, #with_captured_console
Constructor Details
#initialize(id = nil, token = nil) ⇒ DataFile
Returns a new instance of DataFile.
19
20
21
22
|
# File 'lib/predicsis_ml_sdk/data_file.rb', line 19
def initialize(id = nil, token = nil)
@token = token
@id = id
end
|
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
4
5
6
|
# File 'lib/predicsis_ml_sdk/data_file.rb', line 4
def id
@id
end
|
Class Method Details
.get(id, token = nil) ⇒ Object
11
12
13
|
# File 'lib/predicsis_ml_sdk/data_file.rb', line 11
def self.get(id, token = nil)
new(id, token).get
end
|
.get_signed_url(id, token = nil) ⇒ Object
15
16
17
|
# File 'lib/predicsis_ml_sdk/data_file.rb', line 15
def self.get_signed_url(id, token = nil)
new(id, token).get_signed_url
end
|
.upload(params = {}) ⇒ Object
6
7
8
9
|
# File 'lib/predicsis_ml_sdk/data_file.rb', line 6
def self.upload(params = {})
params.delete('expires_at')
Requests.upload(params)
end
|
Instance Method Details
#get ⇒ Object
24
25
26
27
28
|
# File 'lib/predicsis_ml_sdk/data_file.rb', line 24
def get
data = Requests.get_data_file(@token, @id)
define_attributes(data)
self
end
|
#get_signed_url ⇒ Object
30
31
32
33
34
|
# File 'lib/predicsis_ml_sdk/data_file.rb', line 30
def get_signed_url
data = Requests.get_signed_url(@token, @id)
define_attributes(data)
self
end
|