How to upload files to Google Docs from Rails app? - ruby-on-rails

I have working Rails app with authorization from Google and view with documents from Google Docs. How can I make button 'Upload', which upload files from computer to Google Docs? Please help, write teachable code. Thank u.

For quick intro and for all the others, check out this documentation that might help: http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html

This guide explains how to use Ruby on Rails with the Google Data APIs, including samples for the Documents List API:
http://code.google.com/apis/gdata/articles/gdata_on_rails.html

Related

Loop through PDFs in Google Drive, display on Rails site

I have a client storing PDFs in a public Google Drive folder. I would like to loop through that folder and display a clickable link (i.e. filename) on my Rails web page. I'm reading through the Google Drive API information here:
https://developers.google.com/drive/api/v3/about-sdk
Can anyone recommend additional methods or tutorials that might be useful for a rails app?
Alternatively, would it be better to use Amazon S3 and Paperclip EDIT. 5/25/18 Paperclip is deprecated. Active Storage has been recommended for file upload for file upload and storage? (Not sure I want to go this route. I think my client wants to create his file in Drive and voila! It appears on his web page. Just not sure that's possible.)
Newbie programmer here. Thanks.
To get a list of files from a Google Drive folder you'll need to use the Files:list method from the Drive API
In the Files:list page I generally find it useful to use the "Try this API" to get sample responses from the Google API.
To list all the files for a given Folder ID you'll want to use the following syntax for the q parameter:
'<folder_id_here>' in parents
For example:
'1Cz3KdJlzMj-vmN6OMd_nQyUKWlkdsfujo' in parents
For Ruby example specific to the Drive API, see:
https://developers.google.com/drive/api/v3/folder
For complete Ruby examples, maybe check out the following:
https://github.com/google/google-api-ruby-client-samples

How to start with garb-gem in Rails?

I am a ruby on rails newbie and like to get some data from the google analytics api with the garb gem.
But I struggle at the very beginning. Does anyone have a little sample app to retrieve some data that I can use as a starting point?
KR, Fabian
you can refer following links for garb
http://geekospace.com/working-with-garb-a-rails-gem-for-google-analytics/
http://viget.com/extend/introducing-garb-access-the-google-analytics-data-export-api-with-ruby
http://www.tweetegy.com/2010/06/using-google-analytics-api-in-a-ruby-on-rails-project/

uploading to google drive with paperclip in Rails

Hello there i am new to using the google drive gem and i do not know how to use it with paperclip to upload photos to the google drive. Its a simple rails application that i am developing that uploads photos to google drive, is there any rails application example that i can use to get me started with the gem or can any body present an example here to aid we beginners using the google drive gem. Paperclip should be used to upload the files. Thank You
You'd likely have to implement a storage adapter for Paperclip. Take a look at something like https://github.com/dripster82/paperclipdropbox as an example. In that case, it looks like it only supports uploading to a single pre-authorized account. If that's OK, then modifying that to talk to Google Drive instead of Dropbox should be straightforward. If you need to support multiple users, you'd have to make sure the right credentials are being used for the current user.
Anyway, the paperclip docs are likely the best place to get started :)

Google Docs editor like in any web language

I have a project in where i need to write documents in a webeditor like the new googledocs,
I know that google docs doesnt support editing and saving the documents on my own server.
My question is :
There is any similar version of the new google docs payable or in any other licence that permits me to edit a document in an editor like the new google docs where can i save the content editable in my own db ,writen in any web programming language ?
thanks in advance!
If I understand you mean to say you need exactly as Google Docs? - Like Uploading doc downloading doc kind of.
We can do it in jquery

Integrate Google Search Appliance with Rails Application

I wanted to integrate GSA with Rails. But the web proved to be un-helpful. Anybody knows any step-by-step tutorial.
First, you have to call the GSA with the search query. The reference informations for generating the GET-request is here: http://code.google.com/apis/searchappliance/documentation/610/xml_reference.html#SubmittingaSearchRequest
Then you will receive a xml response from the GSA with all needed information inside. The reference for the xml nodes are here (Look better at a xml response from your GSA and get additional informations in my link): http://code.google.com/apis/searchappliance/documentation/610/xml_reference.html#results_xml_tags
Last but not least, you have to parse the informations within the xml and generate your custom frontend.
I hope that will help you. It isn't really complicated.
Define "integrate" closer. The most things are language independent and have nothing to do with Rails/Java/.Net or whatever
Try using the gem rails-gsa this will help you a lot in integrating the Google Search Appliance with your rails Application.
Check out the documentation on github https://github.com/rohit9889/rails-gsa

Resources