Class: Lt::Lcms::Lesson::Downloader::Gslide

Inherits:
Base
  • Object
show all
Defined in:
lib/lt/lcms/lesson/downloader/gslide.rb

Constant Summary collapse

MIME_TYPE =
'application/vnd.google-apps.presentation'
MIME_TYPE_EXPORT =
'application/vnd.openxmlformats-officedocument.presentationml.presentation'

Constants inherited from Base

Base::MAX_RETRY_COUNT, Base::RETRY_DELAYES

Instance Attribute Summary

Attributes inherited from Base

#content

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#download, #file, file_id_for

Constructor Details

#initialize(credentials, file_url, opts = {}) ⇒ Gslide

Returns a new instance of Gslide.



17
18
19
20
# File 'lib/lt/lcms/lesson/downloader/gslide.rb', line 17

def initialize(credentials, file_url, opts = {})
  super
  @service = opts[:service]
end

Class Method Details

.gdoc_file_url(id) ⇒ Object



13
14
15
# File 'lib/lt/lcms/lesson/downloader/gslide.rb', line 13

def self.gdoc_file_url(id)
  "https://docs.google.com/presentation/d/#{id}"
end

Instance Method Details

#file_idObject



22
23
24
25
26
# File 'lib/lt/lcms/lesson/downloader/gslide.rb', line 22

def file_id
  return super if @file_url.include?('/')

  @file_id ||= @file_url
end