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
Attributes included from Util
#token
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Util
#bearer_token, #define_attributes, included, #with_captured_console
Constructor Details
#initialize(id, token = bearer_token) ⇒ DataFile
Returns a new instance of DataFile.
15
16
17
18
|
# File 'lib/predicsis_ml_sdk/data_file.rb', line 15
def initialize(id, token = bearer_token)
@token = token
@id = id
end
|
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
5
6
7
|
# File 'lib/predicsis_ml_sdk/data_file.rb', line 5
def id
@id
end
|
Class Method Details
.get(id, token = bearer_token) ⇒ Object
7
8
9
|
# File 'lib/predicsis_ml_sdk/data_file.rb', line 7
def self.get(id, token = bearer_token)
new(id, token).get
end
|
.get_signed_url(id, token = bearer_token) ⇒ Object
11
12
13
|
# File 'lib/predicsis_ml_sdk/data_file.rb', line 11
def self.get_signed_url(id, token = bearer_token)
new(id, token).get_signed_url
end
|
Instance Method Details
#get ⇒ Object
20
21
22
23
24
|
# File 'lib/predicsis_ml_sdk/data_file.rb', line 20
def get
data = Requests.get_data_file(token, id)
define_attributes(data)
self
end
|
#get_signed_url ⇒ Object
26
27
28
29
30
|
# File 'lib/predicsis_ml_sdk/data_file.rb', line 26
def get_signed_url
data = Requests.get_signed_url(token, id)
define_attributes(data)
self
end
|