Freckle
A simple RestClient-based Let’s Freckle API client.
Only supports reading data.
Example
Freckle.establish_connection( :account => "apitest",
:token => "lx3gi6pxdjtjn57afp8c2bv1me7g89j" )
project = Freckle::Project.all.first
user = Freckle::User.by_email("[email protected]")
# all project's entries
project.entries
# all project's entries for specific people
project.entries(:people => [user.id])
# user's entries for a time range
user.entries(:from => "2010-07-01", :to => "2010-07-30")
# user's unbillable entries
user.entries(:billable => false)
# entries matching search params for multiple people, projects, with tags,
# in a date range, and only billable
Freckle::Entry.all( :billable => true,
:people => [user.id, 5543],
:projects => [project.id, 8475],
:tags => ["foobar"],
:from => "2010-06-01",
:to => "2010-07-30")
See http://github.com/madrobby/freckle-apidocs/blob/master/entries.mkdn for available entries query parameters.
TODO
- CRUD
Contributors
Thanks to:
- Emily Price (duien)
License
The MIT License
Copyright © 2010 Matt Todd.
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.