Fish Trophy

smacleod got a fish trophy!

Fish Trophy

Add a method for retreiving resources from a path

Review Request #4004 — Created March 26, 2013 and submitted — Latest diff uploaded

Information

RBTools
master

Reviewers

Add a method for retreiving resources from a path

The RBClient now has a 'get_path' method which will accept a path and
retreive the API resource at that path. For example a path of
'/review-requests/123' would retreive the resource at
'http://example.com/api/review-requests/123'

A 'ParseError' Exception has also been added for commands. If there is
an error parsing the command arguments or options, the command should
raise a ParseError.
Used the new 'get_path' method as part of a new command providing some
lower level access to API resources. This command also utilizes the
ParseError.

Verified get_path was generating correct HttpRequests, and returning
the expected resource. Verfified the old behaviour when raising
a CommandError, and tested ParseError by raising in a commands main.
The ParseError caused the expected usage output and error message.