README.md in tracker_api-1.7.1 vs README.md in tracker_api-1.8.0

- old
+ new

@@ -66,13 +66,24 @@ id: 847762630) # Use the Story resource to get the story comments = story.comments # comments without first fetching the story comment = story.create_comment(text: "Use the force!") # Create a new comment on the story +comment = story.create_comment(text: "Use the force again !", # Create a new comment on the story with + files: ['path/to/an/existing/file']) # file attachments + comment.text += " (please be careful)" comment.save # Update text of an existing comment +comment.delete # Delete an existing comment +comment.create_attachments(files: ['path/to/an/existing/file']) # Add attachments to existing comment +comment.delete_attachments # Delete all attachments from a comment + +attachments = comment.attachments # Get attachments associated with a comment +attachments.first.delete # Delete a specific attachment + +comment.attachments(reload: true) # Re-load the attachments after modification task = story.tasks.first # Get story tasks task.complete = true task.save # Mark a task complete epics = project.epics # Get all epics for a project @@ -93,10 +104,14 @@ client.project(project_id, fields: ':default,epics') # Eagerly get epics with a project client.project(project_id).stories(fields: ':default,tasks') # Eagerly get stories with tasks story.comments(fields: ':default,person') # Eagerly get comments and the person that made the comment for a story ``` +## Error Handling +`TrackerApi::Errors::ClientError` is raised for 4xx HTTP status codes +`TrackerApi::Errors::ServerError` is raised for 5xx HTTP status codes + ## Warning Direct mutation of an attribute value skips coercion and dirty tracking. Please use direct assignment or the specialized add_* methods to get expected behavior. https://github.com/solnic/virtus#important-note-about-member-coercions @@ -116,9 +131,10 @@ ## TODO - Add missing resources and endpoints - Add create, update, delete for resources +- Error handling for [error responses](https://www.pivotaltracker.com/help/api#Error_Responses) ## Semantic Versioning http://semver.org/ Given a version number MAJOR.MINOR.PATCH, increment the: