Skip to content

Commit

Permalink
Support Google Drive - Files
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuataylor committed Feb 8, 2017
1 parent f6e31a5 commit be786ec
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions lib/google/apis/drive/google/apis/drive/files.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
defmodule Google.Apis.Drive.Files do
use Google.Apis.Base, endpoint: "https://www.googleapis.com/drive/v3/files"

@doc """
Creates a copy of a file and applies any requested updates with patch semantics.
Usage:
Google.Apis.Drive.Files.copy(fileId: {"1234abcd"})
Available params:
fileId: "", keepRevisionForever: false, ignoreDefaultVisibility: false, ocrLanguage: ""
fileId: The ID of the file to copy. This can be obtained either via the API, or copying
the ID out of the Google Docs URL.
keepRevisionForever: Whether to set the 'keepForever' field in the new head revision.
This is only applicable to files with binary content in Drive. (Default: false)
ocrLanguage: A language hint for OCR processing during image import (ISO 639-1 code).
ignoreDefaultVisibility: Whether to ignore the domain's default visibility settings for the created file.
Domain administrators can choose to make all uploaded files visible to the domain by default;
this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders.
(Default: false)
See https://developers.google.com/drive/v3/reference/files/copy
"""
def copy(params \\ [fileId: "", keepRevisionForever: false, ignoreDefaultVisibility: false], request_body \\ []) do
get!(URI.encode_query(params)).body
end
end

0 comments on commit be786ec

Please sign in to comment.