https://github.com/motdotla/signatureio-ruby
Ruby Bindings for Signature.io's API.
https://github.com/motdotla/signatureio-ruby
Last synced: 4 months ago
JSON representation
Ruby Bindings for Signature.io's API.
- Host: GitHub
- URL: https://github.com/motdotla/signatureio-ruby
- Owner: motdotla
- License: mit
- Created: 2013-01-21T01:34:19.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-06-26T22:00:21.000Z (over 12 years ago)
- Last Synced: 2024-10-14T11:01:24.083Z (12 months ago)
- Language: Ruby
- Size: 184 KB
- Stars: 4
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Signatureio Ruby Bindings
This gem is a wrapper for [Signature.io](https://www.signature.io)'s API.
## Installation
Add this line to your application's Gemfile:
gem 'signatureio'
And then execute:
$ bundle
Or install it yourself as:
$ gem install signatureio
Then in your application initialize the gem:
$ Signatureio.secret_api_key = "your_secret_api_key"
$ Signatureio.public_api_key = "your_public_api_key"Alternatively, you can simply set the environment variables SIGNATURE_SECRET_API_KEY and SIGNATURE_PUBLIC_API_KEY on your machine. The rubygem will read it automatically so that you can skip the initialization.
## Usage
### Create Document
$ Signatureio::Document.create(:url => "https://www.signature.io/pdfs/sign-below.pdf")
Replace the url with a url of the PDF or Microsoft Word file you choose.
### Retrieve Document
$ Signatureio::Document.retrieve("id_of_document")
### Retrive Document Pages
```bash
$ Signatureio::Document.pages("id_of_document")
```### List Documents
$ Signatureio::Document.all
### List Events
$ Signatureio::Event.all
$ Signatureio::Event.all({count: 1, offset: 1, type: "document.created"})## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. export SIGNATURE_SECRET_API_KEY="your_test_secret_api_key"
4. export SIGNATURE_PUBLIC_API_KEY="your_test_public_api_key"
5. Commit your changes (`git commit -am 'Add some feature'`)
6. Push to the branch (`git push origin my-new-feature`)
7. Create new Pull Request