Fish Trophy

smacleod got a fish trophy!

Add a method for retreiving resources from a path

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

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.
Description From Last Updated

Where is this raised?

daviddavid
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        rbtools/api/transport/sync.py
        rbtools/api/client.py
        rbtools/commands/__init__.py
        rbtools/api/transport/__init__.py
      Ignored Files:
    
    
  2. 
      
david
  1. Testing done?
  2. rbtools/commands/__init__.py (Diff revision 1)
     
     
    Where is this raised?
    1. This is raised by a new command which will be part of a separate
      change. The new command will rely on the code from this patch, as
      well as API refactoring coming in another request.
  3. 
      
SM
chipx86
  1. Ship It!
  2. 
      
SM
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (8a35af2fcb8f6f0c485899572bdbd91f7994b766).
Loading...