Class: Kao::Files::Models::File

Inherits:
Base
  • Object
show all
Defined in:
lib/kao/files/models/file.rb

Instance Attribute Summary

Attributes inherited from Base

#api

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Kao::Files::Models::Base

Instance Method Details

#detailObject



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/kao/files/models/file.rb', line 11

def detail
  response = @api.client.get do |req|
    req.url "/videos/#{id}"
    req.headers['Content-Type'] = 'application/json'
  end

  res = convert_to_snake_case(JSON.parse(response.body))
  assign_attributes_only_current_attributes(res)

  self
end