Class: DevTrainingBot::GoogleDriveService
- Inherits:
-
Object
- Object
- DevTrainingBot::GoogleDriveService
- Extended by:
- Forwardable
- Defined in:
- lib/dev_training_bot/services/google_drive_service.rb
Constant Summary collapse
- OOB_URI =
'urn:ietf:wg:oauth:2.0:oob'.freeze
- APPLICATION_NAME =
'Dev Training Bot'.freeze
- CLIENT_SECRETS_PATH =
ENV['CLIENT_SECRETS_PATH'].freeze
- CREDENTIALS_PATH =
ENV['CLIENT_TOKEN_PATH'].freeze
- SCOPE =
Google::Apis::DriveV3::AUTH_DRIVE_READONLY
- DOC_URL =
"https://docs.google.com/document/d/#{ENV['FILE_ID']}".freeze
- FORMATS =
{ 'html' => 'text/html', 'zip' => 'application/zip', 'text' => 'text/plain', 'rtf' => 'application/rtf', 'open_office' => 'application/vnd.oasis.opendocument.text', 'pdf' => 'application/pdf', 'word' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'epub' => 'application/epub+zip' }
Instance Attribute Summary collapse
-
#service ⇒ Object
readonly
Returns the value of attribute service.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ GoogleDriveService
constructor
A new instance of GoogleDriveService.
Constructor Details
#initialize ⇒ GoogleDriveService
Returns a new instance of GoogleDriveService.
37 38 39 40 41 |
# File 'lib/dev_training_bot/services/google_drive_service.rb', line 37 def initialize @service = Google::Apis::DriveV3::DriveService.new @service..application_name = APPLICATION_NAME @service. = end |
Instance Attribute Details
#service ⇒ Object (readonly)
Returns the value of attribute service.
27 28 29 |
# File 'lib/dev_training_bot/services/google_drive_service.rb', line 27 def service @service end |