Skip to content

Commit

Permalink
Updated README and added LICENSE
Browse files Browse the repository at this point in the history
  • Loading branch information
jwright committed Jul 26, 2013
1 parent 31678b2 commit ba3b198
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 0 deletions.
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2013, Brilliant Fantastic, LLC.

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
86 changes: 86 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,89 @@ Sox
====

A RubyMotion wrapper for the Freshbooks API.

## Installation

Add this to your RubyMotion application's `Gemfile`:

```ruby
gem 'sox'
```

And then execute:

```sh
bundle
```

Then add this to your RubyMotion application's `Rakefile`:

```ruby
require 'sox'
```

## Usage

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.

```ruby
@client = Sox::Client 'your-freshbooks-subdomain', 'api-token'
```

You can then use your client object to perform the CRUD operations on Freshbooks.

```ruby
projects = @client.projects.all
```

Sox will convert the XML that is returned from the Freshbooks API into modern day hashes. Yay!

```ruby
puts projects[:response][:projects][:project][0][:client_id]
```

## TODO

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

* Clients (create, update, get, delete)
* Projects (create, 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)
* Taxes (create, update, get, delete)
* Time entries (create, update, get, delete)

## Contributing

1. Fork it
1. Run `bundle` to get the Gem dependency
1. Run `rake spec` to run all of the tests to ensure they pass
1. Create your feature branch (`git checkout -b my-awesome-sauce`)
1. Write your specs
1. Code!
1. Commit your changes (`git commit -am 'Added some awesome sauce'`)
1. Push your new branch (`git push origin my-awesome-sauce`)
1. Create a pull request (`hub pull-request -b brilliantfantastic:master -h yourrepo:my-awesome-sauce`)

## License

MIT. See [LICENSE](LICENSE)

0 comments on commit ba3b198

Please sign in to comment.