Class: Google::Apis::DrivelabelsV2::DriveLabelsService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DrivelabelsV2::DriveLabelsService
- Defined in:
- lib/google/apis/drivelabels_v2/service.rb
Overview
Drive Labels API
An API for managing Drive Labels
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#get_label(name, language_code: nil, use_admin_access: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
Get a label by its resource name.
-
#initialize ⇒ DriveLabelsService
constructor
A new instance of DriveLabelsService.
-
#list_labels(language_code: nil, minimum_role: nil, page_size: nil, page_token: nil, published_only: nil, use_admin_access: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelsResponse
List labels.
Constructor Details
#initialize ⇒ DriveLabelsService
Returns a new instance of DriveLabelsService.
45 46 47 48 49 50 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 45 def initialize super('https://drivelabels.googleapis.com/', '', client_name: 'google-apis-drivelabels_v2', client_version: Google::Apis::DrivelabelsV2::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
38 39 40 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 38 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
43 44 45 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 43 def quota_user @quota_user end |
Instance Method Details
#get_label(name, language_code: nil, use_admin_access: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
Get a label by its resource name. Resource name may be any of: * labels/id``
- See
labels/id@latest*labels/id@latest- Gets the latest revision of the label. *labels/id@published- Gets the current published revision of the label. *labels/id@revision_id`` - Gets the label at the specified revision ID.
87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 87 def get_label(name, language_code: nil, use_admin_access: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}', ) command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label command.params['name'] = name unless name.nil? command.query['languageCode'] = language_code unless language_code.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['view'] = view unless view.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_labels(language_code: nil, minimum_role: nil, page_size: nil, page_token: nil, published_only: nil, use_admin_access: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelsResponse
List labels.
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 141 def list_labels(language_code: nil, minimum_role: nil, page_size: nil, page_token: nil, published_only: nil, use_admin_access: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/labels', ) command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelsResponse::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelsResponse command.query['languageCode'] = language_code unless language_code.nil? command.query['minimumRole'] = minimum_role unless minimum_role.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['publishedOnly'] = published_only unless published_only.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['view'] = view unless view.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |