Class: Short::Short
- Inherits:
-
Object
- Object
- Short::Short
- Defined in:
- lib/openobserve-api/api/short/short.rb
Instance Method Summary collapse
- #get(short_id:, org_id:, type: nil) ⇒ Object
-
#initialize(connection) ⇒ Short
constructor
A new instance of Short.
Constructor Details
#initialize(connection) ⇒ Short
Returns a new instance of Short.
5 6 7 |
# File 'lib/openobserve-api/api/short/short.rb', line 5 def initialize(connection) @connection = connection end |
Instance Method Details
#get(short_id:, org_id:, type: nil) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/openobserve-api/api/short/short.rb', line 9 def get(short_id:, org_id:, type: nil) raise ArgumentError, 'short_id is required' if short_id.nil? raise ArgumentError, 'org_id is required' if org_id.nil? @connection.call( :GET, '/short/{org_id}/short/{short_id}' .gsub('{short_id}', ERB::Util.url_encode(short_id.to_s)) .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: [], query: { 'type' => type } ) end |