google-docs-api

how do i get message list with Gmail Api?

微笑、不失礼 提交于 2019-12-04 17:31:42
i want to access list of messages Object: 2.0.0-p481 :008 > g.gmail_api.users.messages.list => # < Google::APIClient::Method:0x41c948c ID:gmail.users.messages.list > i'm new in this API and unable to get how do i use Gmail API. Thanks # Google gem "omniauth-google-oauth2" gem "google-api-client" in my model def query_google( email ) self.refresh_token_from_google if self.expires_at.to_i < Time.now.to_i @google_api_client = Google::APIClient.new( application_name: 'Joggle', application_version: '1.0.0' ) @google_api_client.authorization.access_token = self.access_key @gmail = @google_api_client

Create file on GAE/J and upload to Google docs

天大地大妈咪最大 提交于 2019-12-04 15:42:18
Is it possible to create any kind of file on GAE/J and upload to google docs? I've asked a similar question before about creating and uploading PDF. Thanks. Update According to Google Docs API "To upload a document to the server, you can attach the file to the new DocumentListEntry using the setFile() method.". And setFile method needs java.io.File which is not accepted by GAE/J setFile(java.io.File file, java.lang.String mimeType). Is there a solution I can upload without storing data. I need java.io.File type as an argument for the setFile() method to work. I've tried using gaevfs( http:/

Need to upload files to google docs from my application and store reference to the uploaded file

♀尐吖头ヾ 提交于 2019-12-04 13:34:17
问题 I'm working on a basic google applications based system. Like I earlier defined I'm building a simple ordering system and to each order placed I attach a file or document. I would like to be able to set it such that whatever file I upload is uploaded into google docs and I somehow am able to maintain a reference to that file from my own application i.e these files are concerned with such and such order. My application is google application based hopefully and I'm building it to be such for

How to copy a template and insert content from another document?

雨燕双飞 提交于 2019-12-04 13:17:32
问题 I want to write a Google Docs script that copies a template (which just contains a container bound script) and appends the contents of another document chosen by the user. How would I accomplish this? I already have a way to select the file (the template has a static id), but figure out a way to copy all the content of the document (including inlineImages and hyperLinks) to the my new document. 回答1: I guess the only way is to copy elements one by one... there are a whole bunch of document

Google Docs iFrame: How to customize the css of an embedded Google Docs iFrame

末鹿安然 提交于 2019-12-04 09:34:00
问题 I have this code of an iframe displaying a google docs document: <div itemprop="description" class="col-xs-12 no-h-padding" id="article_desc" style="margin:0 auto; width:90%; float:none;"> <iframe src="https://docs.google.com/viewer?url=http://example.com/docs/1.pdf&hl=ar&embedded=true" scrolling="no"></iframe> </div> The iFrame works great and display the following iFrame: Now i want to change the grey background as seen in the picture above into a white background color, i've been searching

How to upload/update file by FileStream and ResumableUploader in C#

牧云@^-^@ 提交于 2019-12-04 06:34:32
问题 I wanna upload/update file by System.IO.FileStream in Google Documents List API(C#)? I use two way below: Google.GData.Client.ResumableUpload.ResumableUploader (1) public void UpdateAsync(Authenticator authentication, AbstractEntry payload, object userData) (2) public void UpdateAsync(Authenticator authentication, Uri resumableUploadUri, Stream payload, string contentType, object userData) (1) Success. (2) Failed with 403 Forbidden or another... So, does someone have any sample code about (2)

How to get Google docs last edit date

家住魔仙堡 提交于 2019-12-04 02:05:20
I am working on an app in which I need to show the date when google doc was last edited. Snapshot Here I am able to get last modified date through Drive api But it is different from last edited date for cases when file's metadata (e.g. permission) has changed and content hasn't. Is there any way to get date when google doc was last edited? In Google Apps Script there is a DriveApp service that you can use. Something like this will work: function lastUpdatedOn() { var FILE_ID = 'FILEID'; return DriveApp.getFileById(FILE_ID).getLastUpdated(); } The documentation for that is here: https:/

Google Document List API and Google Drive SDK

依然范特西╮ 提交于 2019-12-03 14:11:25
问题 What is the roadmap for DOcument List Api? It has more functions (i.e. ACL) than Google Drive SDK. Now Sample for JAVA or PHP have dissapeared from documentations. Is it going to be deprecated in the near future? 回答1: Currently, the Documents List API is an API that is related to the Google Drive SDK, and it can be used to access the same data. We plan in the future that the Drive API itself will directly contain all the functionality of the Documents List API. Sorry for the somewhat vague

How to copy a template and insert content from another document?

妖精的绣舞 提交于 2019-12-03 08:37:47
I want to write a Google Docs script that copies a template (which just contains a container bound script) and appends the contents of another document chosen by the user. How would I accomplish this? I already have a way to select the file (the template has a static id), but figure out a way to copy all the content of the document (including inlineImages and hyperLinks) to the my new document. Serge insas I guess the only way is to copy elements one by one... there are a whole bunch of document elements but it shouldn't be too hard to be quite exhaustive. Here is how it goes for the most

How can a Dart application read cell data from google spreadsheets

若如初见. 提交于 2019-12-03 08:28:11
What are the possible options and setups one would need for reading data out of a google docs spreadsheet into a dart web application? Does dart need the wrapper around gdata REST api to do this? Has any dart project or sample interacted with google docs? Newer Google APIs have a common API infrastructure where the client libraries are always up to date. There is such a client library for Dart (http://docs.google-api-dart-client.googlecode.com/git/index.html). However, it looks like Google Spreadsheets is still using an older API infrastructure called GData. There is no GData client library