Resource specific base classes for new API

Review Request #3273 — Created Aug. 12, 2012 and submitted

Information

RBTools
master

Reviewers

This provides the resource specific base classes necessary for full API functionality (Such as downloading diffs). A few extra classes have been included to provide convenience functions (mostly for file uploading).

Dependent on parent diff in /r/3184.
Uploaded file attachments to demo.reviewboard.org.
Downloaded diffs locally.
Description From Last Updated

"make" should be removed I think.

chipx86chipx86

Would be nice to say whether the diff and parent_diff are string contents or file objects.

chipx86chipx86

Food for thought. It'd be neat to have a decorator for classes that did this instead, so classes wouldn't have …

chipx86chipx86

Like above, this should say what format it's expecting for the content.

chipx86chipx86

Too many s's?

chipx86chipx86

Here too.

chipx86chipx86

No need to capitalize "Review Request"

chipx86chipx86
chipx86
  1. 
      
  2. rbtools/api/resource.py (Diff revision 1)
     
     
    Show all issues
    "make" should be removed I think.
  3. rbtools/api/resource.py (Diff revision 1)
     
     
    Show all issues
    Would be nice to say whether the diff and parent_diff are string contents or file objects.
  4. rbtools/api/resource.py (Diff revision 1)
     
     
    Show all issues
    Food for thought. It'd be neat to have a decorator for classes that did this instead, so classes wouldn't have to know about RESOURCE_MAP.
    1. This was just a copy of the pattern from the Web API resources on RB's side. I like this idea, I'll look into it.
    2. Didn't mean to make this an issue. You definitely don't need to do it this change :)
  5. rbtools/api/resource.py (Diff revision 1)
     
     
    Show all issues
    Like above, this should say what format it's expecting for the content.
  6. rbtools/api/resource.py (Diff revision 1)
     
     
    Show all issues
    Too many s's?
  7. rbtools/api/resource.py (Diff revision 1)
     
     
    Show all issues
    Here too.
  8. rbtools/api/resource.py (Diff revision 1)
     
     
    Show all issues
    No need to capitalize "Review Request"
  9. 
      
SM
chipx86
  1. Ship It!
  2. 
      
SM
chipx86
  1. Ship It!
  2. 
      
SM
Review request changed
Status:
Completed
Change Summary:
Pushed to api (b3f6891)