Aaww
A simple Authentise API Wrapper using HTTMultiParty for uploads
Installation
Add this line to your application's Gemfile:
gem 'aaww'
And then execute:
$ bundle
Or install it yourself as:
$ gem install aaww
Usage
Start a new transaction:
transaction = Aaww::Transaction.new key: 'your_api_key'
Generate a token for this transaction:
transaction.create_token
Upload a file and get a link to send the user to:
transaction.upload File.new('some.stl'), '[email protected]', 3.99
or just upload!
if you instantiated the Transaction with everything needed:
transaction = Aaww::Transaction.new key: 'your_api_key', file: File.new('some.stl'), email: '[email protected]', value: 3.99
transaction.upload!
Then, you can access the token links created by Authentise with:
transaction.link
transaction.ssl_link
Contributing
- Fork it ( https://github.com/lainventoria/aaww/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request