Ruby wrapper for the Doccy api
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
spec
.gitignore
Gemfile
LICENSE.txt
README.md
Rakefile
doccy-api.gemspec

README.md

Doccy

Official Ruby wrapper for the https://www.doccyapp.com api

Installation

Add this line to your application's Gemfile:

gem 'doccy-api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install doccy-api

Usage

Create a doccy_api.rb file in your config/initializers folder and add the following

Doccy::Config.mode = :staging # OPTIONAL defaults to production.
Doccy::Config.app_key = "YOUR-PARTNER-KEY" #OPTIONAL you only need this to create client accounts.

Sections

Accounts

Doccy Partners are able to create client accounts through their applications. To become a partner contact us at support@doccyapp.com for more information.

Create an account and a user:

Doccy::Accounts.create(company_name, user_name, email, password, options = {})

Templates

Returns all Templates for that users account

Doccy::Templates.all(auth_token)

Returns a specific Template

Doccy::Templates.get(auth_token, template_id)

Uploads a Template to Doccy

  • Method: post

  • Request Params:

    • template[name]: Name of template in Doccy * Required
    • template[description]: Optional
    • template[document_template]: Template file to upload * Required
  • Request Example: no request content

    Doccy::Templates.upload(auth_token, template_params)

Documents

Creates a Document from Template

  • Method: post

  • Request Params:

    • document[name]: Name of document * Required
    • document[content][:placeholder]: Placeholde should be replaced by the values returned from template show action

    Doccy::Documents.create(auth_token, template_id, document_params)

Returns a specific Document

Doccy::Documents.get(auth_token, template_id, document_id)

Downloads a Document

Doccy::Documents.download(auth_token, template_id, document_id, original=nil)
  • if you past through original=true as a param if will return the document in the original format with the merges rather then in PDF.

Emails

Will send a document via Doccy

Doccy::Documents.create(auth_token, template_id, document_id, email_params)

Login

This will return the auth_token for that user.

Doccy::Session.create(email, password)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request