README.rdoc in freeagent_api-0.2.0 vs README.rdoc in freeagent_api-0.3.0
- old
+ new
@@ -9,14 +9,14 @@
* Projects
* Tasks
* Invoices
* Invoice Items
* Timeslips
+* Users
At the moment, the following API resources are NOT supported (although is being worked on):
-* Users
* Expenses
* Attachments
Feel free to clone, fork and add tests.
@@ -227,12 +227,45 @@
Timeslip.delete id
# or
@timeslip.destroy
-== Author
+=== Users
+
+<b>Find users</b>
+
+ @users = User.find :all # returns all users
+ @user = User.find id # returns specific user
+ @user = User.find_by_email email
+
+<b>Create user</b>
+
+ # Required attributes
+ # :first_name
+ # :last_name
+ # :email
+ # :role # must be Owner, Director, Partner, Company Secretary, Employee, Shareholder, or Accountant
+ # :password
+ # :password_confirmation
+
+ @user = User.new params
+ @user.save
+
+<b>Update user</b>
+
+ @user.first_name = 'Joe Bloggs'
+ @user.save
+
+<b>Delete user</b>
+
+ User.delete id
+ # or
+ @user.destroy
+
+== Author & Contributors
* Aaron Russell - (www.aaronrussell.co.uk)
+* Alex Comans - (www.alexcoomans.com)
== Copyright
-Copyright (c) 2009 Aaron Russell. See LICENSE for details.
+Copyright (c) 2009-2010 Aaron Russell. See LICENSE for details.