当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


R googledrive drive_endpoints 列出驱动器端点


googledrive 包在内部存储 Drive API v3 端点的命名列表(或 "methods",使用 Google 的词汇),并且这些函数公开此数据。

  • drive_endpoint() 返回一个端点,即它使用 [[

  • drive_endpoints() 返回端点列表,即它使用 [

此列表的名称(或 id 子元素)是可用于指定 request_generate() 中的端点的昵称。对于每个端点,我们存储其昵称或 id 、关联的 HTTP 动词、 path 以及有关参数的详细信息。此列表是使用漱口插图 Request helper functionsDiscovery Documents section 中说明的方法以编程方式从 Drive API v3 发现文档 (https://www.googleapis.com/discovery/v1/apis/drive/v3/rest ) 派生的。

用法

drive_endpoints(i = NULL)

drive_endpoint(i)

参数

i

要返回的端点的名称或整数索引。 i 对于 drive_endpoints() 是可选的,如果未给出,则返回整个列表。

googledrive 内部使用的一个或多个 Drive API v3 端点。

例子

str(head(drive_endpoints(), 3), max.level = 2)
#> List of 3
#>  $ drive.about.get                :List of 7
#>   ..$ id         : chr "drive.about.get"
#>   ..$ httpMethod : chr "GET"
#>   ..$ path       : 'fs_path' chr "drive/v3/about"
#>   ..$ scopes     : chr "drive, drive.appdata, drive.file, drive.metadata, drive.metadata.readonly, drive.photos.readonly, drive.readonly"
#>   ..$ description: chr "Gets information about the user, the user's Drive, and system capabilities."
#>   ..$ response   : chr "About"
#>   ..$ parameters :List of 7
#>  $ drive.changes.getStartPageToken:List of 7
#>   ..$ id         : chr "drive.changes.getStartPageToken"
#>   ..$ httpMethod : chr "GET"
#>   ..$ path       : 'fs_path' chr "drive/v3/changes/startPageToken"
#>   ..$ parameters :List of 11
#>   ..$ scopes     : chr "drive, drive.appdata, drive.file, drive.metadata, drive.metadata.readonly, drive.photos.readonly, drive.readonly"
#>   ..$ description: chr "Gets the starting pageToken for listing future changes."
#>   ..$ response   : chr "StartPageToken"
#>  $ drive.changes.list             :List of 9
#>   ..$ id                  : chr "drive.changes.list"
#>   ..$ httpMethod          : chr "GET"
#>   ..$ path                : 'fs_path' chr "drive/v3/changes"
#>   ..$ parameters          :List of 20
#>   ..$ scopes              : chr "drive, drive.appdata, drive.file, drive.metadata, drive.metadata.readonly, drive.photos.readonly, drive.readonly"
#>   ..$ description         : chr "Lists the changes for a user or shared drive."
#>   ..$ response            : chr "ChangeList"
#>   ..$ parameterOrder      : chr "pageToken"
#>   ..$ supportsSubscription: logi TRUE
drive_endpoint("drive.files.delete")
#> $id
#> [1] "drive.files.delete"
#> 
#> $httpMethod
#> [1] "DELETE"
#> 
#> $path
#> drive/v3/files/{fileId}
#> 
#> $parameters
#> $parameters$enforceSingleParent
#> $parameters$enforceSingleParent$type
#> [1] "boolean"
#> 
#> $parameters$enforceSingleParent$description
#> [1] "Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root."
#> 
#> $parameters$enforceSingleParent$default
#> [1] "false"
#> 
#> $parameters$enforceSingleParent$location
#> [1] "query"
#> 
#> 
#> $parameters$fileId
#> $parameters$fileId$type
#> [1] "string"
#> 
#> $parameters$fileId$description
#> [1] "The ID of the file."
#> 
#> $parameters$fileId$required
#> [1] TRUE
#> 
#> $parameters$fileId$location
#> [1] "path"
#> 
#> 
#> $parameters$supportsAllDrives
#> $parameters$supportsAllDrives$type
#> [1] "boolean"
#> 
#> $parameters$supportsAllDrives$description
#> [1] "Whether the requesting application supports both My Drives and shared drives."
#> 
#> $parameters$supportsAllDrives$default
#> [1] "false"
#> 
#> $parameters$supportsAllDrives$location
#> [1] "query"
#> 
#> 
#> $parameters$supportsTeamDrives
#> $parameters$supportsTeamDrives$type
#> [1] "boolean"
#> 
#> $parameters$supportsTeamDrives$description
#> [1] "Deprecated use supportsAllDrives instead."
#> 
#> $parameters$supportsTeamDrives$default
#> [1] "false"
#> 
#> $parameters$supportsTeamDrives$location
#> [1] "query"
#> 
#> 
#> $parameters$alt
#> $parameters$alt$type
#> [1] "string"
#> 
#> $parameters$alt$description
#> [1] "Data format for the response."
#> 
#> $parameters$alt$default
#> [1] "json"
#> 
#> $parameters$alt$enum
#> [1] "json"
#> 
#> $parameters$alt$enumDescriptions
#> [1] "Responses with Content-Type of application/json"
#> 
#> $parameters$alt$location
#> [1] "query"
#> 
#> 
#> $parameters$fields
#> $parameters$fields$type
#> [1] "string"
#> 
#> $parameters$fields$description
#> [1] "Selector specifying which fields to include in a partial response."
#> 
#> $parameters$fields$location
#> [1] "query"
#> 
#> 
#> $parameters$key
#> $parameters$key$type
#> [1] "string"
#> 
#> $parameters$key$description
#> [1] "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."
#> 
#> $parameters$key$location
#> [1] "query"
#> 
#> 
#> $parameters$oauth_token
#> $parameters$oauth_token$type
#> [1] "string"
#> 
#> $parameters$oauth_token$description
#> [1] "OAuth 2.0 token for the current user."
#> 
#> $parameters$oauth_token$location
#> [1] "query"
#> 
#> 
#> $parameters$prettyPrint
#> $parameters$prettyPrint$type
#> [1] "boolean"
#> 
#> $parameters$prettyPrint$description
#> [1] "Returns response with indentations and line breaks."
#> 
#> $parameters$prettyPrint$default
#> [1] "true"
#> 
#> $parameters$prettyPrint$location
#> [1] "query"
#> 
#> 
#> $parameters$quotaUser
#> $parameters$quotaUser$type
#> [1] "string"
#> 
#> $parameters$quotaUser$description
#> [1] "An opaque string that represents a user for quota purposes. Must not exceed 40 characters."
#> 
#> $parameters$quotaUser$location
#> [1] "query"
#> 
#> 
#> $parameters$userIp
#> $parameters$userIp$type
#> [1] "string"
#> 
#> $parameters$userIp$description
#> [1] "Deprecated. Please use quotaUser instead."
#> 
#> $parameters$userIp$location
#> [1] "query"
#> 
#> 
#> 
#> $scopes
#> [1] "drive, drive.appdata, drive.file"
#> 
#> $description
#> [1] "Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted."
#> 
#> $parameterOrder
#> [1] "fileId"
#> 
drive_endpoint(4)
#> $id
#> [1] "drive.changes.watch"
#> 
#> $httpMethod
#> [1] "POST"
#> 
#> $path
#> drive/v3/changes/watch
#> 
#> $parameters
#> $parameters$driveId
#> $parameters$driveId$type
#> [1] "string"
#> 
#> $parameters$driveId$description
#> [1] "The shared drive from which changes are returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier."
#> 
#> $parameters$driveId$location
#> [1] "query"
#> 
#> 
#> $parameters$includeCorpusRemovals
#> $parameters$includeCorpusRemovals$type
#> [1] "boolean"
#> 
#> $parameters$includeCorpusRemovals$description
#> [1] "Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file."
#> 
#> $parameters$includeCorpusRemovals$default
#> [1] "false"
#> 
#> $parameters$includeCorpusRemovals$location
#> [1] "query"
#> 
#> 
#> $parameters$includeItemsFromAllDrives
#> $parameters$includeItemsFromAllDrives$type
#> [1] "boolean"
#> 
#> $parameters$includeItemsFromAllDrives$description
#> [1] "Whether both My Drive and shared drive items should be included in results."
#> 
#> $parameters$includeItemsFromAllDrives$default
#> [1] "false"
#> 
#> $parameters$includeItemsFromAllDrives$location
#> [1] "query"
#> 
#> 
#> $parameters$includePermissionsForView
#> $parameters$includePermissionsForView$type
#> [1] "string"
#> 
#> $parameters$includePermissionsForView$description
#> [1] "Specifies which additional view's permissions to include in the response. Only 'published' is supported."
#> 
#> $parameters$includePermissionsForView$location
#> [1] "query"
#> 
#> 
#> $parameters$includeRemoved
#> $parameters$includeRemoved$type
#> [1] "boolean"
#> 
#> $parameters$includeRemoved$description
#> [1] "Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access."
#> 
#> $parameters$includeRemoved$default
#> [1] "true"
#> 
#> $parameters$includeRemoved$location
#> [1] "query"
#> 
#> 
#> $parameters$includeTeamDriveItems
#> $parameters$includeTeamDriveItems$type
#> [1] "boolean"
#> 
#> $parameters$includeTeamDriveItems$description
#> [1] "Deprecated use includeItemsFromAllDrives instead."
#> 
#> $parameters$includeTeamDriveItems$default
#> [1] "false"
#> 
#> $parameters$includeTeamDriveItems$location
#> [1] "query"
#> 
#> 
#> $parameters$pageSize
#> $parameters$pageSize$type
#> [1] "integer"
#> 
#> $parameters$pageSize$description
#> [1] "The maximum number of changes to return per page."
#> 
#> $parameters$pageSize$default
#> [1] "100"
#> 
#> $parameters$pageSize$format
#> [1] "int32"
#> 
#> $parameters$pageSize$minimum
#> [1] "1"
#> 
#> $parameters$pageSize$maximum
#> [1] "1000"
#> 
#> $parameters$pageSize$location
#> [1] "query"
#> 
#> 
#> $parameters$pageToken
#> $parameters$pageToken$type
#> [1] "string"
#> 
#> $parameters$pageToken$description
#> [1] "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method."
#> 
#> $parameters$pageToken$required
#> [1] TRUE
#> 
#> $parameters$pageToken$location
#> [1] "query"
#> 
#> 
#> $parameters$restrictToMyDrive
#> $parameters$restrictToMyDrive$type
#> [1] "boolean"
#> 
#> $parameters$restrictToMyDrive$description
#> [1] "Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive."
#> 
#> $parameters$restrictToMyDrive$default
#> [1] "false"
#> 
#> $parameters$restrictToMyDrive$location
#> [1] "query"
#> 
#> 
#> $parameters$spaces
#> $parameters$spaces$type
#> [1] "string"
#> 
#> $parameters$spaces$description
#> [1] "A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'."
#> 
#> $parameters$spaces$default
#> [1] "drive"
#> 
#> $parameters$spaces$location
#> [1] "query"
#> 
#> 
#> $parameters$supportsAllDrives
#> $parameters$supportsAllDrives$type
#> [1] "boolean"
#> 
#> $parameters$supportsAllDrives$description
#> [1] "Whether the requesting application supports both My Drives and shared drives."
#> 
#> $parameters$supportsAllDrives$default
#> [1] "false"
#> 
#> $parameters$supportsAllDrives$location
#> [1] "query"
#> 
#> 
#> $parameters$supportsTeamDrives
#> $parameters$supportsTeamDrives$type
#> [1] "boolean"
#> 
#> $parameters$supportsTeamDrives$description
#> [1] "Deprecated use supportsAllDrives instead."
#> 
#> $parameters$supportsTeamDrives$default
#> [1] "false"
#> 
#> $parameters$supportsTeamDrives$location
#> [1] "query"
#> 
#> 
#> $parameters$teamDriveId
#> $parameters$teamDriveId$type
#> [1] "string"
#> 
#> $parameters$teamDriveId$description
#> [1] "Deprecated use driveId instead."
#> 
#> $parameters$teamDriveId$location
#> [1] "query"
#> 
#> 
#> $parameters$address
#> $parameters$address$type
#> [1] "string"
#> 
#> $parameters$address$description
#> [1] "The address where notifications are delivered for this channel."
#> 
#> $parameters$address$location
#> [1] "body"
#> 
#> 
#> $parameters$expiration
#> $parameters$expiration$type
#> [1] "string"
#> 
#> $parameters$expiration$description
#> [1] "Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional."
#> 
#> $parameters$expiration$format
#> [1] "int64"
#> 
#> $parameters$expiration$location
#> [1] "body"
#> 
#> 
#> $parameters$id
#> $parameters$id$type
#> [1] "string"
#> 
#> $parameters$id$description
#> [1] "A UUID or similar unique string that identifies this channel."
#> 
#> $parameters$id$location
#> [1] "body"
#> 
#> 
#> $parameters$kind
#> $parameters$kind$type
#> [1] "string"
#> 
#> $parameters$kind$description
#> [1] "Identifies this as a notification channel used to watch for changes to a resource, which is \"api#channel\"."
#> 
#> $parameters$kind$default
#> [1] "api#channel"
#> 
#> $parameters$kind$location
#> [1] "body"
#> 
#> 
#> $parameters$params
#> $parameters$params$type
#> [1] "object"
#> 
#> $parameters$params$description
#> [1] "Additional parameters controlling delivery channel behavior. Optional."
#> 
#> $parameters$params$additionalProperties
#> $parameters$params$additionalProperties$type
#> [1] "string"
#> 
#> $parameters$params$additionalProperties$description
#> [1] "Declares a new parameter by name."
#> 
#> 
#> $parameters$params$location
#> [1] "body"
#> 
#> 
#> $parameters$payload
#> $parameters$payload$type
#> [1] "boolean"
#> 
#> $parameters$payload$description
#> [1] "A Boolean value to indicate whether payload is wanted. Optional."
#> 
#> $parameters$payload$location
#> [1] "body"
#> 
#> 
#> $parameters$resourceId
#> $parameters$resourceId$type
#> [1] "string"
#> 
#> $parameters$resourceId$description
#> [1] "An opaque ID that identifies the resource being watched on this channel. Stable across different API versions."
#> 
#> $parameters$resourceId$location
#> [1] "body"
#> 
#> 
#> $parameters$resourceUri
#> $parameters$resourceUri$type
#> [1] "string"
#> 
#> $parameters$resourceUri$description
#> [1] "A version-specific identifier for the watched resource."
#> 
#> $parameters$resourceUri$location
#> [1] "body"
#> 
#> 
#> $parameters$token
#> $parameters$token$type
#> [1] "string"
#> 
#> $parameters$token$description
#> [1] "An arbitrary string delivered to the target address with each notification delivered over this channel. Optional."
#> 
#> $parameters$token$location
#> [1] "body"
#> 
#> 
#> $parameters$type
#> $parameters$type$type
#> [1] "string"
#> 
#> $parameters$type$description
#> [1] "The type of delivery mechanism used for this channel. Valid values are \"web_hook\" (or \"webhook\"). Both values refer to a channel where Http requests are used to deliver messages."
#> 
#> $parameters$type$location
#> [1] "body"
#> 
#> 
#> $parameters$alt
#> $parameters$alt$type
#> [1] "string"
#> 
#> $parameters$alt$description
#> [1] "Data format for the response."
#> 
#> $parameters$alt$default
#> [1] "json"
#> 
#> $parameters$alt$enum
#> [1] "json"
#> 
#> $parameters$alt$enumDescriptions
#> [1] "Responses with Content-Type of application/json"
#> 
#> $parameters$alt$location
#> [1] "query"
#> 
#> 
#> $parameters$fields
#> $parameters$fields$type
#> [1] "string"
#> 
#> $parameters$fields$description
#> [1] "Selector specifying which fields to include in a partial response."
#> 
#> $parameters$fields$location
#> [1] "query"
#> 
#> 
#> $parameters$key
#> $parameters$key$type
#> [1] "string"
#> 
#> $parameters$key$description
#> [1] "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."
#> 
#> $parameters$key$location
#> [1] "query"
#> 
#> 
#> $parameters$oauth_token
#> $parameters$oauth_token$type
#> [1] "string"
#> 
#> $parameters$oauth_token$description
#> [1] "OAuth 2.0 token for the current user."
#> 
#> $parameters$oauth_token$location
#> [1] "query"
#> 
#> 
#> $parameters$prettyPrint
#> $parameters$prettyPrint$type
#> [1] "boolean"
#> 
#> $parameters$prettyPrint$description
#> [1] "Returns response with indentations and line breaks."
#> 
#> $parameters$prettyPrint$default
#> [1] "true"
#> 
#> $parameters$prettyPrint$location
#> [1] "query"
#> 
#> 
#> $parameters$quotaUser
#> $parameters$quotaUser$type
#> [1] "string"
#> 
#> $parameters$quotaUser$description
#> [1] "An opaque string that represents a user for quota purposes. Must not exceed 40 characters."
#> 
#> $parameters$quotaUser$location
#> [1] "query"
#> 
#> 
#> $parameters$userIp
#> $parameters$userIp$type
#> [1] "string"
#> 
#> $parameters$userIp$description
#> [1] "Deprecated. Please use quotaUser instead."
#> 
#> $parameters$userIp$location
#> [1] "query"
#> 
#> 
#> 
#> $scopes
#> [1] "drive, drive.appdata, drive.file, drive.metadata, drive.metadata.readonly, drive.photos.readonly, drive.readonly"
#> 
#> $description
#> [1] "Subscribes to changes for a user."
#> 
#> $request
#> [1] "Channel"
#> 
#> $response
#> [1] "Channel"
#> 
#> $parameterOrder
#> [1] "pageToken"
#> 
#> $supportsSubscription
#> [1] TRUE
#> 

相关用法


注:本文由纯净天空筛选整理自Jennifer Bryan等大神的英文原创作品 List Drive endpoints。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。