class OneDriveForBusiness::File
Public Class Methods
new(drive, fields)
click to toggle source
Calls superclass method
# File lib/onedrive_for_business/file.rb, line 8 def initialize(drive, fields) @content_url = fields['content_url'] @image = ImageFacet.new(fields['image']) if fields['image'] super end
Public Instance Methods
download!()
click to toggle source
# File lib/onedrive_for_business/file.rb, line 14 def download! url = "#{drive.url}/Files/#{id}/content" http(url).get(url, 'authorization' => "Bearer #{drive.access_token}").body end