Giter VIP home page Giter VIP logo

gdocs4ruby's Introduction

#=GDocs4Ruby
#
#==Introduction
#GDocs4Ruby is a full featured wrapper for version 2.0 of the Google Documents API (aka DocList).  GDocs4Ruby provides the ability
#to create, update and delete google documents, metadata and content.  The gem also includes support for folders, modifying
#permissions for documents via ACL feeds, and much more.
#
#GDocs4Ruby uses the GData4Ruby Gem for interacting with the Google API.  Check out http://cookingandcoding.com/gdata4ruby for 
#other Google API Libraries based using GData4Ruby.
#
#==Author and Contact Information
#GDocs4Ruby was created and is maintained by {Mike Reich}[mailto:[email protected]] 
#and is licenses under the GPL v2.  Feel free to use and update, but be sure to contribute your
#code back to the project and attribute as required by the license.
#===Website
#http://cookingandcoding.com/gdocs4ruby/
#
#==Description
#GDocs4Ruby includes the following classes: Service, Folder, BaseObject, Spreadsheet, Document, Presentation.
#
#The Service object provides functionality for authenticating with the Google Documents API, grabbing a list of 
#documents and a list of folders associated with the account.
#
#Interacting with objects is done by using the associated subclass of BaseObject, i.e. Document.  Every object
#class supports the same inherited methods for creating, updating and deleting, in addition to changing
#ACL permissions, and adding and removing from various folders.
#
#==Examples
#Below are some common usage examples.  For more examples, check the documentation.  Also, check out the example code
#for integrating with Rails at http://cookingandcoding.com/gdocs4ruby/example/
#===Service
#1. Authenticate
#    service = Service.new
#    service.authenticate("[email protected]", "password")
#
#2. Get Document List
#    documents = service.files
#
#3. Get Folder List
#    folders = serivce.folders
#
#===Documents
#1. Create a new Document
#    doc = Document.new(@service)
#    doc.title = 'Test Document'
#    doc.content = '<h1>Test Content HTML</h1>'
#    doc.content_type = 'html'
#    doc.save
#
#2. Deleting a Document
#    doc = Document.find(@service, {:id => @doc_id})
#    doc.delete
#
#3. Finding an existing Document by id
#    doc = Document.find(@service, {:id => @doc_id})
#
#4. Full Text Query
#    doc = Document.find(@service, 'content text')
#
#   or
#
#    doc = Document.find(@service, {:query => 'content text'})
#
#5. Finding an Existing Document by Title
#    doc = Document.find(@service, nil, {'title' => 'Test Document'})
#
#6. Updating a Document with Content from a Local File
#    doc = Document.find(@service, {:id => @doc_id})
#    doc.title = 'New Title'
#    doc.local_file = '/path/to/some/file'
#    doc.save
#
#7. Retrieving an Export
#    doc = Document.find(@service, {:id => @doc_id})
#    doc.download_to_file('pdf', '/path/to/save/location.pdf')

gdocs4ruby's People

Contributors

mjreich avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.