A Ruby SDK for HelloSign's API
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 1 commit ahead, 268 commits behind HelloFax:v3.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
.rspec
.travis.yml
Gemfile
Guardfile
LICENSE.txt
README.md
Rakefile
hellosign-ruby-sdk.gemspec

README.md

HelloSign Ruby SDK

In addition to this readme, checkout our quickstart guide here: https://www.hellosign.com/api/gettingStarted#QuickStart

Installation

Add this line to your application's Gemfile:

gem 'hellosign-ruby-sdk'

And then execute:

$ bundle

Configuration

Create a config block. At a minimum you'll want to set your API Key but depending on your usage you'll possibly want to set your app's Client ID and Client Secret. In Rails you can place it in config/initializers/hello_sign.rb

require 'hello_sign'
HelloSign.configure do |config|
  config.api_key = 'api_key'
  # You can use email_address and password instead of api_key. But api_key is recommended
  # If api_key, email_address and password are all present, api_key will be used
  # config.email_address = 'email_address'
  # config.password = 'password'
  config.client_id = 'your_cliend_id' #required only when you want to use embedded or OAuth
  config.client_secret = 'your_cliend_secret' #required only when you want to use OAuth
end

##Usage When you have configured your app like above, you can start using it:

# get your account
my_account = HelloSign.get_account

# get your signature requests
my_signature_requests = HelloSign.get_signature_requests

# view a specific signature request
signature_request = HelloSign.get_signature_requests :signature_request_id => '42383e7327eda33f4b8b91217cbe95408cc1285f'

If you need to authenticate for multiple users and you want a separated client for them, you can run:

client2 = HelloSign::Client.new :api_key => 'your_user_api_key'
user_account = client2.get_account

##Testing

Testing relies on built in hard-coded fixtures. You can run the tests without affecting your actual account data. To do so from the root of your project run rake spec.