Class: Uplink::EdgeCredential
- Inherits:
-
Object
- Object
- Uplink::EdgeCredential
- Defined in:
- lib/uplink/edge_credential.rb
Instance Attribute Summary collapse
-
#access_key_id ⇒ Object
readonly
Returns the value of attribute access_key_id.
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
-
#secret_key ⇒ Object
readonly
Returns the value of attribute secret_key.
Instance Method Summary collapse
-
#initialize(edge_credentials_result, edge_credentials = nil) ⇒ EdgeCredential
constructor
A new instance of EdgeCredential.
- #join_share_url(base_url, bucket, key, options = nil) ⇒ Object
Constructor Details
#initialize(edge_credentials_result, edge_credentials = nil) ⇒ EdgeCredential
Returns a new instance of EdgeCredential.
7 8 9 |
# File 'lib/uplink/edge_credential.rb', line 7 def initialize(edge_credentials_result, edge_credentials = nil) init_attributes(edge_credentials_result.nil? || edge_credentials_result.null? ? edge_credentials : edge_credentials_result[:credentials]) end |
Instance Attribute Details
#access_key_id ⇒ Object (readonly)
Returns the value of attribute access_key_id.
5 6 7 |
# File 'lib/uplink/edge_credential.rb', line 5 def access_key_id @access_key_id end |
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
5 6 7 |
# File 'lib/uplink/edge_credential.rb', line 5 def endpoint @endpoint end |
#secret_key ⇒ Object (readonly)
Returns the value of attribute secret_key.
5 6 7 |
# File 'lib/uplink/edge_credential.rb', line 5 def secret_key @secret_key end |
Instance Method Details
#join_share_url(base_url, bucket, key, options = nil) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/uplink/edge_credential.rb', line 11 def join_share_url(base_url, bucket, key, = nil) = nil if && !.empty? = UplinkLib::EdgeShareURLOptions.new [:raw] = [:raw] end result = UplinkLib.edge_join_share_url(base_url, @access_key_id, bucket, key, ) ErrorUtil.handle_result_error(result) result[:string] ensure UplinkLib.uplink_free_string_result(result) if result end |