A RubyMotion wrapper for the Freshbooks API.
Add this to your RubyMotion application's Gemfile:
gem 'sox'And then execute:
bundleThen add this to your RubyMotion application's Rakefile:
require 'sox'All requests can go through the Sox::Client object. To create a client object, you pass it your authorization credentials.
Currenly Sox only supports basic authentication using your Freshbooks API token but we there is a plan to add OAuth support.
You can retrieve your Freshbooks API token from the 'My Account' page on Freshbooks.
@client = Sox::Client.new 'your-freshbooks-subdomain', 'api-token'You can then use your client object to perform the CRUD operations on Freshbooks.
projects = @client.projects.allSox will convert the XML that is returned from the Freshbooks API into modern day hashes. Yay!
puts projects[:response][:projects][:project][0][:client_id]This is a very early release. All the base classes and supporting classes should be in place to easily add the additional proxies and API calls (specifically find, update, create, and delete).
-
Currently only setup for OSX
-
Add integration tests for real API data
-
Support for OAuth authentication
-
Clients (update, get, delete)
-
Projects (update, get, delete)
-
Categories (create, update, get, delete, list)
-
Estimates (create, update, get, delete, list, sendByEmail)
-
Categories (create, update, get, delete, list)
-
Expenses (create, update, get, delete, list)
-
Gateways (list)
-
Invoices (create, update, get, delete, list, sendByEmail, sendbySnailMail)
-
Invoice Items (add, delete, update)
-
Items (create, update, get, delete, list)
-
Languages (list)
-
Payments (create, update, get, delete, list)
-
Receipts (create, update, get, delete)
-
Recurring (create, update, get, delete, list)
-
Recurring Items (add, delete, update)
-
Staff (current, get, list)
-
Tasks (create, update, get, delete, list)
-
Taxes (create, update, get, delete, list)
-
Time entries (update, get, delete)
- Fork it
- Run
bundleto get the Gem dependency - Run
rake specto run all of the tests to ensure they pass - Create your feature branch (
git checkout -b my-awesome-sauce) - Write your specs
- Code!
- Commit your changes (
git commit -am 'Added some awesome sauce') - Push your new branch (
git push origin my-awesome-sauce) - Create a pull request (
hub pull-request -b brilliantfantastic:master -h yourrepo:my-awesome-sauce)
MIT. See LICENSE