Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drive/snippets/drive-v2/change snippet/fetch_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def fetch_changes(saved_start_page_token):
"""
creds, _ = google.auth.default()
try:
# create gmail api client
# create drive api client
service = build('drive', 'v2', credentials=creds)

# Begin with our last saved start token for this user or the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def fetch_start_page_token():
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v2', credentials=creds)

# pylint: disable=maybe-no-member
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v2/drive_snippet/create_drive.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def create_drive():
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v2', credentials=creds)

drive_metadata = {'name': 'Project Resources'}
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v2/drive_snippet/recover_drives.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def recover_drives(real_user):
"""
creds, _ = google.auth.default()
try:
# create gmail api client
# create drive api client
service = build('drive', 'v2', credentials=creds)

drives = []
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v2/file snippet/create_folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def create_folder():
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v2', credentials=creds)
file_metadata = {
'title': 'Invoices',
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v2/file snippet/create_shortcut.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def create_shortcut():
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v2', credentials=creds)
file_metadata = {
'title': 'Project plan',
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v2/file snippet/download_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def download_file(real_file_id):
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v2', credentials=creds)

file_id = real_file_id
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v2/file snippet/export_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def export_pdf(real_file_id):
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v2', credentials=creds)

file_id = real_file_id
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v2/file snippet/search_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def search_file():
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v2', credentials=creds)
files = []
page_token = None
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v2/file snippet/share_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def share_file(real_file_id, real_user, real_domain):
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v2', credentials=creds)
ids = []
file_id = real_file_id
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v2/file snippet/touch_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def touch_file(real_file_id, real_timestamp):
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v2', credentials=creds)

file_metadata = {
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v2/file snippet/upload_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def upload_basic():
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v2', credentials=creds)

file_metadata = {'title': 'photo.jpg'}
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v2/file snippet/upload_revision.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def upload_revision(real_file_id):
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v2', credentials=creds)
file_id = real_file_id
media = MediaFileUpload('photo.jpg',
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v2/file snippet/upload_to_folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def upload_to_folder(real_folder_id):
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v2', credentials=creds)

folder_id = real_folder_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def upload_with_conversion():
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v2', credentials=creds)

file_metadata = {
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v3/change_snippet/fetch_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def fetch_changes(saved_start_page_token):
"""
creds, _ = google.auth.default()
try:
# create gmail api client
# create drive api client
service = build('drive', 'v3', credentials=creds)

# Begin with our last saved start token for this user or the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def fetch_start_page_token():
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v3', credentials=creds)

# pylint: disable=maybe-no-member
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v3/drive_snippet/create_drive.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def create_drive():
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v3', credentials=creds)

drive_metadata = {'name': 'Project Resources'}
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v3/drive_snippet/recover_drives.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def recover_drives(real_user):
"""
creds, _ = google.auth.default()
try:
# create gmail api client
# create drive api client
service = build('drive', 'v3', credentials=creds)

drives = []
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v3/file_snippet/create_folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def create_folder():
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v3', credentials=creds)
file_metadata = {
'title': 'Invoices',
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v3/file_snippet/create_shortcut.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def create_shortcut():
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v3', credentials=creds)
file_metadata = {
'title': 'Project plan',
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v3/file_snippet/download_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def download_file(real_file_id):
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v3', credentials=creds)

file_id = real_file_id
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v3/file_snippet/export_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def export_pdf(real_file_id):
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v3', credentials=creds)

file_id = real_file_id
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v3/file_snippet/search_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def search_file():
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v3', credentials=creds)
files = []
page_token = None
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v3/file_snippet/share_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def share_file(real_file_id, real_user, real_domain):
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v3', credentials=creds)
ids = []
file_id = real_file_id
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v3/file_snippet/touch_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def touch_file(real_file_id, real_timestamp):
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v3', credentials=creds)

file_metadata = {
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v3/file_snippet/upload_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def upload_basic():
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v3', credentials=creds)

file_metadata = {'name': 'download.jpeg'}
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v3/file_snippet/upload_revision.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def upload_revision(real_file_id):
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v3', credentials=creds)
file_id = real_file_id
media = MediaFileUpload('download.jpeg',
Expand Down
2 changes: 1 addition & 1 deletion drive/snippets/drive-v3/file_snippet/upload_to_folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def upload_to_folder(real_folder_id):
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v3', credentials=creds)

folder_id = real_folder_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def upload_with_conversion():
creds, _ = google.auth.default()

try:
# create gmail api client
# create drive api client
service = build('drive', 'v3', credentials=creds)

file_metadata = {
Expand Down