Introduce the api-get command.
Review Request #4195 — Created June 2, 2013 and submitted — Latest diff uploaded
Introduce the api-get command. The new rbt api-get command takes a path to an api resource, requests the resource, and prints it as JSON. The path can either be rooted at the api level (e.g. '/review-requests/123/') or be a full url. Query arguments may also be specified for the request. Each query argument, appearing after '--', taking the form '--<query-arg>=<value>' will be added to the request. For example, 'rbt api-get /review-requests/ -- --counts-only=1' would result in a request to 'http://example.com/api/review-requests/?counts-only=1'. To support this new command, a new 'get_url' is now required for transports. This change provides the required method for the SyncTransport.
Requested a number of resources with different query arguments and observed the expected JSON output. Also tested some error conditions such as print the error payloads when requesting non-existent review-request resources (ids which don't exist).