Git Product home page Git Product logo

groupdocs-ruby's Introduction

GroupDocs Build Status

Ruby SDK for GroupDocs REST API.

Installation

Install as usually

gem install groupdocs

Installing from source

gem install bundler # unless it's already installed
git clone [email protected]:groupdocs/groupdocs-ruby.git
cd groupdocs-ruby/
git checkout master
bundle install --path vendor/bundle
bundle exec rake install

Usage

All "bang" methods (ending with exclamation sign) imply interaction with API server.

Other methods (with expect to some, see documentation) do not operate with API Server

Configuration

First of all you need to configure your access to API server.

require 'groupdocs'

GroupDocs.configure do |groupdocs|
  groupdocs.client_id = 'your_client_id'
  groupdocs.private_key = 'your_private_key'
  # optionally specify API server and version
  groupdocs.api_server = 'https://dev-api.groupdocs.com' # default is 'https://api.groupdocs.com'
  groupdocs.api_version = '3.0' # default is '2.0'
end

GroupDocs::Storage::Folder.create!('/folder')
#=> #<GroupDocs::Storage::Folder:0x0000000171f432 @id=1, @name="folder", @url="http://groupdocs.com">

You can also pass access credentials to particular requests

GroupDocs::Storage::Folder.create!('/folder', client_id: 'your_client_id', private_key: 'your_private_key')
#=> #<GroupDocs::Storage::Folder:0x0000000171f432 @id=1, @name="folder", @url="http://groupdocs.com">

Documentation

Reference to this page for docs and examples.

There is rather exhaustive documentation about internal SDK structure at wiki page.

There are also some examples in repository and on wiki

Entities

All entities can be initialized in several ways.

  • Object is created, attributes are set later.
folder = GroupDocs::Storage::Folder.new
folder.name = 'Folder'
folder.inspect
#=> #<GroupDocs::Storage::Folder:0x0000000171f432 @name="Folder">
  • Hash of attributes are passed to object constructor.
GroupDocs::Storage::Folder.new(name: 'Folder')
#=> #<GroupDocs::Storage::Folder:0x0000000171f432 @name="Folder">
  • Block is passed to object constructor.
GroupDocs::Storage::Folder.new do |folder|
  folder.name = 'Folder'
end
#=> #<GroupDocs::Storage::Folder:0x0000000171f432 @name="Folder">

Copyright

Copyright (c) 2012 Aspose Inc.

groupdocs-ruby's People

Contributors

adomokos avatar averjr avatar dkhylan avatar oleksiyboyko avatar p0deje avatar risinglf avatar

Watchers

 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.