class GoogleDrive::RevisionsApi

Defined in:

google_drive/api/revisions_api.cr

Constant Summary

DRIVE_REVISIONS_DELETE_VALID_VALUES_FOR_ALT = String.static_array("json", "media")
DRIVE_REVISIONS_GET_VALID_VALUES_FOR_ALT = String.static_array("json", "media")
DRIVE_REVISIONS_LIST_MAX_FOR_PAGE_SIZE = Int32.new("1000")
DRIVE_REVISIONS_LIST_MIN_FOR_PAGE_SIZE = Int32.new("1")
DRIVE_REVISIONS_LIST_VALID_VALUES_FOR_ALT = String.static_array("json", "media")
DRIVE_REVISIONS_UPDATE_VALID_VALUES_FOR_ALT = String.static_array("json", "media")

Constructors

Instance Method Summary

Constructor Detail

def self.new(api_client : GoogleDrive::ApiClient = ApiClient.default) #

[View source]

Instance Method Detail

def api_client : ApiClient #

[View source]
def api_client=(api_client : ApiClient) #

[View source]
def build_api_request_for_delete(*, file_id : String | Nil = nil, revision_id : String | Nil = nil, alt : String | Nil = "json", fields : String | Nil = nil, key : String | Nil = nil, oauth_token : String | Nil = nil, pretty_print : Bool | Nil = nil, quota_user : String | Nil = nil, user_ip : String | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_get(*, file_id : String | Nil = nil, revision_id : String | Nil = nil, alt : String | Nil = "json", fields : String | Nil = nil, key : String | Nil = nil, oauth_token : String | Nil = nil, pretty_print : Bool | Nil = nil, quota_user : String | Nil = nil, user_ip : String | Nil = nil, acknowledge_abuse : Bool | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_list(*, file_id : String | Nil = nil, alt : String | Nil = "json", fields : String | Nil = nil, key : String | Nil = nil, oauth_token : String | Nil = nil, pretty_print : Bool | Nil = nil, quota_user : String | Nil = nil, user_ip : String | Nil = nil, page_size : Int32 | Nil = nil, page_token : String | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_update(*, file_id : String | Nil = nil, revision_id : String | Nil = nil, alt : String | Nil = "json", fields : String | Nil = nil, key : String | Nil = nil, oauth_token : String | Nil = nil, pretty_print : Bool | Nil = nil, quota_user : String | Nil = nil, user_ip : String | Nil = nil, revision : GoogleDrive::Revision | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def client_side_validation(*args, **options) #

[View source]
def client_side_validation(*args, **options, &) #

[View source]
def debugging(*args, **options) #

[View source]
def debugging(*args, **options, &) #

[View source]
def delete(*, file_id : String | Nil = nil, revision_id : String | Nil = nil, alt : String | Nil = "json", fields : String | Nil = nil, key : String | Nil = nil, oauth_token : String | Nil = nil, pretty_print : Bool | Nil = nil, quota_user : String | Nil = nil, user_ip : String | Nil = nil) : Nil #

Permanently deletes a file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can't be deleted. @required @param file_id [String?] The ID of the file. @required @param revision_id [String?] The ID of the revision. @optional @param alt [String?] Data format for the response. @optional @param fields [String?] Selector specifying which fields to include in a partial response. @optional @param key [String?] 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. @optional @param oauth_token [String?] OAuth 2.0 token for the current user. @optional @param pretty_print [Bool?] Returns response with indentations and line breaks. @optional @param quota_user [String?] An opaque string that represents a user for quota purposes. Must not exceed 40 characters. @optional @param user_ip [String?] Deprecated. Please use quotaUser instead. @return [Nil]


[View source]
def delete(*, file_id : String | Nil = nil, revision_id : String | Nil = nil, alt : String | Nil = "json", fields : String | Nil = nil, key : String | Nil = nil, oauth_token : String | Nil = nil, pretty_print : Bool | Nil = nil, quota_user : String | Nil = nil, user_ip : String | Nil = nil, &block : Crest::Response -> ) : Nil #

Permanently deletes a file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can't be deleted. @required @param file_id [String?] The ID of the file. @required @param revision_id [String?] The ID of the revision. @optional @param alt [String?] Data format for the response. @optional @param fields [String?] Selector specifying which fields to include in a partial response. @optional @param key [String?] 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. @optional @param oauth_token [String?] OAuth 2.0 token for the current user. @optional @param pretty_print [Bool?] Returns response with indentations and line breaks. @optional @param quota_user [String?] An opaque string that represents a user for quota purposes. Must not exceed 40 characters. @optional @param user_ip [String?] Deprecated. Please use quotaUser instead. @return nil


[View source]
def delete_with_http_info(*, file_id : String | Nil = nil, revision_id : String | Nil = nil, alt : String | Nil = "json", fields : String | Nil = nil, key : String | Nil = nil, oauth_token : String | Nil = nil, pretty_print : Bool | Nil = nil, quota_user : String | Nil = nil, user_ip : String | Nil = nil) : Tuple(Nil, Int32, Hash(String, Array(String) | String)) #

Permanently deletes a file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can't be deleted. @required @param file_id [String?] The ID of the file. @required @param revision_id [String?] The ID of the revision. @optional @param alt [String?] Data format for the response. @optional @param fields [String?] Selector specifying which fields to include in a partial response. @optional @param key [String?] 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. @optional @param oauth_token [String?] OAuth 2.0 token for the current user. @optional @param pretty_print [Bool?] Returns response with indentations and line breaks. @optional @param quota_user [String?] An opaque string that represents a user for quota purposes. Must not exceed 40 characters. @optional @param user_ip [String?] Deprecated. Please use quotaUser instead. @return [Tuple(Nil, Integer, Hash)] Nil, response status code and response headers


[View source]
def get(*, file_id : String | Nil = nil, revision_id : String | Nil = nil, alt : String | Nil = "json", fields : String | Nil = nil, key : String | Nil = nil, oauth_token : String | Nil = nil, pretty_print : Bool | Nil = nil, quota_user : String | Nil = nil, user_ip : String | Nil = nil, acknowledge_abuse : Bool | Nil = nil) : GoogleDrive::Revision #

Gets a revision's metadata or content by ID. @required @param file_id [String?] The ID of the file. @required @param revision_id [String?] The ID of the revision. @optional @param alt [String?] Data format for the response. @optional @param fields [String?] Selector specifying which fields to include in a partial response. @optional @param key [String?] 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. @optional @param oauth_token [String?] OAuth 2.0 token for the current user. @optional @param pretty_print [Bool?] Returns response with indentations and line breaks. @optional @param quota_user [String?] An opaque string that represents a user for quota purposes. Must not exceed 40 characters. @optional @param user_ip [String?] Deprecated. Please use quotaUser instead. @optional @param acknowledge_abuse [Bool?] Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media. @return [GoogleDrive::Revision]


[View source]
def get(*, file_id : String | Nil = nil, revision_id : String | Nil = nil, alt : String | Nil = "json", fields : String | Nil = nil, key : String | Nil = nil, oauth_token : String | Nil = nil, pretty_print : Bool | Nil = nil, quota_user : String | Nil = nil, user_ip : String | Nil = nil, acknowledge_abuse : Bool | Nil = nil, &block : Crest::Response -> ) : Nil #

Gets a revision's metadata or content by ID. @required @param file_id [String?] The ID of the file. @required @param revision_id [String?] The ID of the revision. @optional @param alt [String?] Data format for the response. @optional @param fields [String?] Selector specifying which fields to include in a partial response. @optional @param key [String?] 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. @optional @param oauth_token [String?] OAuth 2.0 token for the current user. @optional @param pretty_print [Bool?] Returns response with indentations and line breaks. @optional @param quota_user [String?] An opaque string that represents a user for quota purposes. Must not exceed 40 characters. @optional @param user_ip [String?] Deprecated. Please use quotaUser instead. @optional @param acknowledge_abuse [Bool?] Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media. @return nil


[View source]
def get_with_http_info(*, file_id : String | Nil = nil, revision_id : String | Nil = nil, alt : String | Nil = "json", fields : String | Nil = nil, key : String | Nil = nil, oauth_token : String | Nil = nil, pretty_print : Bool | Nil = nil, quota_user : String | Nil = nil, user_ip : String | Nil = nil, acknowledge_abuse : Bool | Nil = nil) : Tuple(GoogleDrive::Revision, Int32, Hash(String, Array(String) | String)) #

Gets a revision's metadata or content by ID. @required @param file_id [String?] The ID of the file. @required @param revision_id [String?] The ID of the revision. @optional @param alt [String?] Data format for the response. @optional @param fields [String?] Selector specifying which fields to include in a partial response. @optional @param key [String?] 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. @optional @param oauth_token [String?] OAuth 2.0 token for the current user. @optional @param pretty_print [Bool?] Returns response with indentations and line breaks. @optional @param quota_user [String?] An opaque string that represents a user for quota purposes. Must not exceed 40 characters. @optional @param user_ip [String?] Deprecated. Please use quotaUser instead. @optional @param acknowledge_abuse [Bool?] Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media. @return [Tuple(GoogleDrive::Revision, Integer, Hash)] GoogleDrive::Revision, response status code and response headers


[View source]
def list(*, file_id : String | Nil = nil, alt : String | Nil = "json", fields : String | Nil = nil, key : String | Nil = nil, oauth_token : String | Nil = nil, pretty_print : Bool | Nil = nil, quota_user : String | Nil = nil, user_ip : String | Nil = nil, page_size : Int32 | Nil = nil, page_token : String | Nil = nil) : GoogleDrive::RevisionList #

Lists a file's revisions. @required @param file_id [String?] The ID of the file. @optional @param alt [String?] Data format for the response. @optional @param fields [String?] Selector specifying which fields to include in a partial response. @optional @param key [String?] 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. @optional @param oauth_token [String?] OAuth 2.0 token for the current user. @optional @param pretty_print [Bool?] Returns response with indentations and line breaks. @optional @param quota_user [String?] An opaque string that represents a user for quota purposes. Must not exceed 40 characters. @optional @param user_ip [String?] Deprecated. Please use quotaUser instead. @optional @param page_size [Int32?] The maximum number of revisions to return per page. @optional @param page_token [String?] 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. @return [GoogleDrive::RevisionList]


[View source]
def list(*, file_id : String | Nil = nil, alt : String | Nil = "json", fields : String | Nil = nil, key : String | Nil = nil, oauth_token : String | Nil = nil, pretty_print : Bool | Nil = nil, quota_user : String | Nil = nil, user_ip : String | Nil = nil, page_size : Int32 | Nil = nil, page_token : String | Nil = nil, &block : Crest::Response -> ) : Nil #

Lists a file's revisions. @required @param file_id [String?] The ID of the file. @optional @param alt [String?] Data format for the response. @optional @param fields [String?] Selector specifying which fields to include in a partial response. @optional @param key [String?] 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. @optional @param oauth_token [String?] OAuth 2.0 token for the current user. @optional @param pretty_print [Bool?] Returns response with indentations and line breaks. @optional @param quota_user [String?] An opaque string that represents a user for quota purposes. Must not exceed 40 characters. @optional @param user_ip [String?] Deprecated. Please use quotaUser instead. @optional @param page_size [Int32?] The maximum number of revisions to return per page. @optional @param page_token [String?] 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. @return nil


[View source]
def list_with_http_info(*, file_id : String | Nil = nil, alt : String | Nil = "json", fields : String | Nil = nil, key : String | Nil = nil, oauth_token : String | Nil = nil, pretty_print : Bool | Nil = nil, quota_user : String | Nil = nil, user_ip : String | Nil = nil, page_size : Int32 | Nil = nil, page_token : String | Nil = nil) : Tuple(GoogleDrive::RevisionList, Int32, Hash(String, Array(String) | String)) #

Lists a file's revisions. @required @param file_id [String?] The ID of the file. @optional @param alt [String?] Data format for the response. @optional @param fields [String?] Selector specifying which fields to include in a partial response. @optional @param key [String?] 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. @optional @param oauth_token [String?] OAuth 2.0 token for the current user. @optional @param pretty_print [Bool?] Returns response with indentations and line breaks. @optional @param quota_user [String?] An opaque string that represents a user for quota purposes. Must not exceed 40 characters. @optional @param user_ip [String?] Deprecated. Please use quotaUser instead. @optional @param page_size [Int32?] The maximum number of revisions to return per page. @optional @param page_token [String?] 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. @return [Tuple(GoogleDrive::RevisionList, Integer, Hash)] GoogleDrive::RevisionList, response status code and response headers


[View source]
def update(*, file_id : String | Nil = nil, revision_id : String | Nil = nil, alt : String | Nil = "json", fields : String | Nil = nil, key : String | Nil = nil, oauth_token : String | Nil = nil, pretty_print : Bool | Nil = nil, quota_user : String | Nil = nil, user_ip : String | Nil = nil, revision : GoogleDrive::Revision | Nil = nil) : GoogleDrive::Revision #

Updates a revision with patch semantics. @required @param file_id [String?] The ID of the file. @required @param revision_id [String?] The ID of the revision. @optional @param alt [String?] Data format for the response. @optional @param fields [String?] Selector specifying which fields to include in a partial response. @optional @param key [String?] 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. @optional @param oauth_token [String?] OAuth 2.0 token for the current user. @optional @param pretty_print [Bool?] Returns response with indentations and line breaks. @optional @param quota_user [String?] An opaque string that represents a user for quota purposes. Must not exceed 40 characters. @optional @param user_ip [String?] Deprecated. Please use quotaUser instead. @optional @param revision [GoogleDrive::Revision?] @return [GoogleDrive::Revision]


[View source]
def update(*, file_id : String | Nil = nil, revision_id : String | Nil = nil, alt : String | Nil = "json", fields : String | Nil = nil, key : String | Nil = nil, oauth_token : String | Nil = nil, pretty_print : Bool | Nil = nil, quota_user : String | Nil = nil, user_ip : String | Nil = nil, revision : GoogleDrive::Revision | Nil = nil, &block : Crest::Response -> ) : Nil #

Updates a revision with patch semantics. @required @param file_id [String?] The ID of the file. @required @param revision_id [String?] The ID of the revision. @optional @param alt [String?] Data format for the response. @optional @param fields [String?] Selector specifying which fields to include in a partial response. @optional @param key [String?] 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. @optional @param oauth_token [String?] OAuth 2.0 token for the current user. @optional @param pretty_print [Bool?] Returns response with indentations and line breaks. @optional @param quota_user [String?] An opaque string that represents a user for quota purposes. Must not exceed 40 characters. @optional @param user_ip [String?] Deprecated. Please use quotaUser instead. @optional @param revision [GoogleDrive::Revision?] @return nil


[View source]
def update_with_http_info(*, file_id : String | Nil = nil, revision_id : String | Nil = nil, alt : String | Nil = "json", fields : String | Nil = nil, key : String | Nil = nil, oauth_token : String | Nil = nil, pretty_print : Bool | Nil = nil, quota_user : String | Nil = nil, user_ip : String | Nil = nil, revision : GoogleDrive::Revision | Nil = nil) : Tuple(GoogleDrive::Revision, Int32, Hash(String, Array(String) | String)) #

Updates a revision with patch semantics. @required @param file_id [String?] The ID of the file. @required @param revision_id [String?] The ID of the revision. @optional @param alt [String?] Data format for the response. @optional @param fields [String?] Selector specifying which fields to include in a partial response. @optional @param key [String?] 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. @optional @param oauth_token [String?] OAuth 2.0 token for the current user. @optional @param pretty_print [Bool?] Returns response with indentations and line breaks. @optional @param quota_user [String?] An opaque string that represents a user for quota purposes. Must not exceed 40 characters. @optional @param user_ip [String?] Deprecated. Please use quotaUser instead. @optional @param revision [GoogleDrive::Revision?] @return [Tuple(GoogleDrive::Revision, Integer, Hash)] GoogleDrive::Revision, response status code and response headers


[View source]