google-drive-realtime-api

Cannot access Google Drive file

大城市里の小女人 提交于 2019-12-08 12:03:13
问题 I am making a notepad app using Google Drive . Whenever user creates a file in the app, it also creates a file in the Google Drive . And user can enter the text and save the file, the unsaved text will get committed whenever the internet is available. I am managing the update and create processes within the app using the DriveId . If the user wants to use the files with the alternative device using my app, for that I also have the option called DriveId import . By clicking the option DriveId

Files:insert - Google Drive SDK - Python Example - What is Drive API service instance?

◇◆丶佛笑我妖孽 提交于 2019-12-08 09:30:52
问题 USING : Windows7, Python 2.7, Google App Engine Google's documentation for inserting(creating) a file to Google Drive using Python and the Drive API. Here is the link showing the code near the bottom of the page: Write a file to a Google Drive using Python A function named: insert_file is defined in the Python module. def insert_file(service, title, description, parent_id, mime_type, filename): The insert_file function takes 6 arguments passed into it. The first arg is service . In the

Using just javascript to submit information to Google Drive spreadsheet

旧街凉风 提交于 2019-12-07 23:06:34
问题 I am basically looking for a way to use just javascript to submit information to a Google Drive spreadsheet. Changing the value of a specific cell is what I am after. Anyone know if this is possible? Thanks. 回答1: here is the right code it work in localhost as in the web site if u have an apropriate client ID and an API Key for browser, i take the same javascript and i puted it into sencha-touch and phoneGap app but it doesn't work if u have any idea for that ? : <!DOCTYPE html> <!-- Copyright

How to have multiple scopes with Google Calendar + Google Drive

安稳与你 提交于 2019-12-07 17:12:00
问题 I am new to the Google APIs and want to know how I would be able to access 2 different APIs within the same files. I have SCOPES = 'https://www.googleapis.com/auth/calendar' but I also want SCOPES = 'https://www.googleapis.com/auth/drive.metadata.readonly' to be accessible from the same file. Does anyone have any idea how to go about doing this? Thanks! 回答1: When you authenticate simply add both scopes. The user will be prompted to grant you access to both. SCOPES = 'https://www.googleapis

Google's File Insert v2 API fails to recognise MIME TYPE application/vnd.google-apps.document

青春壹個敷衍的年華 提交于 2019-12-07 14:24:28
问题 This morning, I tried using Google APIs File Insert where I provided MIME TYPE as application/vnd.google-apps.document. I am getting the following response from Google API HttpError: <HttpError 400 when requesting https://www.googleapis.com/upload/drive/v2/files?uploadType=resumable&alt=json returned "Invalid mime type provided"> I replaced MIME TYPE application/vnd.google-apps.document with application/msword and the API started working. Has anything changed with Google API? 回答1: Google

Showing documents from Google Drive on webpage

↘锁芯ラ 提交于 2019-12-07 13:00:47
问题 Is it possible to show the documents from my drive on a webpage? I want the user to be able to click the document and download it, directly from my drive. How would I go about doing this? Thank you for your suggestions. 回答1: For HTML/JavaScript solution, look at the following links: https://developers.google.com/drive/quickstart-js https://www.youtube.com/watch?v=09geUJg11iA https://developers.google.com/drive/web/auth/web-client Here's the simplest way using JavaScript, most of the

Copy file into a specific parent folder with Google Drive API?

时光总嘲笑我的痴心妄想 提交于 2019-12-07 06:13:55
问题 I'm using Python 2.7 and a service account to copy a file in Google Drive into another folder based on its title. This requires me to execute five (5!) commands: Find file ID by title. (files().list) Find parent folder ID by title (files().list) Copy file (files().copy) Transfer ownership to a real account (files().insert) Move into the parent folder. (parents().insert) This all works but I'd like to reduce the number of calls and first that means caching the ID's so I don't have to call

How to let anonymous users edit a Google Drive Realtime document?

。_饼干妹妹 提交于 2019-12-07 04:59:12
问题 I want to create a web page that uses Google Drive Realtime API that allows users to anonymously edit several text fields. Because more than one user may be accessing the page simultaneously, I want to prevent someone's edit from being overwritten by another user without the first editor knowing that his edit is overwritten. However, from the quick start, it seems that authorization using Google Account is needed for people to start editing. Is it possible to let arbritrary user edit my

How to style a Google Doc using Google Drive API?

落爺英雄遲暮 提交于 2019-12-06 15:44:58
问题 Currently, I have a web application that basically consists in a simple form. When I submit this form, I generate a document that I send to Google Drive. It works. My problem is that I have no styling and I wonder how I can do that? I tried with HTML and CSS but if the HTML allows me to structure my document, the CSS does nothing. So, how could I do that? 回答1: I guess you're uploading an HTML file, with convert=true, to create a Google Doc. Any "attached" CSS file will be ignored. There is

Drive SDK not listing all my files

痞子三分冷 提交于 2019-12-06 14:48:26
问题 I am trying to list all the files in my drive (about 10) but the following will only list 1 (and that isn't even a real file of mine).... the code: from httplib2 import Http from oauth2client.client import SignedJwtAssertionCredentials client='my_client_id' client_email = 'my_client_email' with open("/path/to/file.p12") as f: private_key = f.read() credentials = SignedJwtAssertionCredentials(client_email, private_key, 'https://www.googleapis.com/auth/drive') http_auth = credentials.authorize