Sneak peek of SearchResource for my quick search

Review Request #2111 — Created Feb. 7, 2011 and discarded

Information

Review Board

Reviewers

This is my first go at my SearchResource. So far, it is able to list out the users, , groups and review request. Through /api/search/?q=<keywords>, it is able to filter through username, first name, last name of a user, name and display name of a group and the ID of a review request. I am currently missing the ability to search the summary of a review request. 

Please take a look if I'm on the right track or if there is anything for improvement. Thanks!

 
chipx86
  1. 
      
  2. reviewboard/webapi/resources.py (Diff revision 1)
     
     
     
     
    Two blank lines between these.
  3. reviewboard/webapi/resources.py (Diff revision 1)
     
     
     
     
    Should be one line for now, but I'd like to see this more fleshed out.
  4. reviewboard/webapi/resources.py (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
    It'd be nice to have each of the per-object queries be a separate function that get() calls out to.
  5. reviewboard/webapi/resources.py (Diff revision 1)
     
     
    No need to fetch these each time. Just re-use search_q.
  6. reviewboard/webapi/resources.py (Diff revision 1)
     
     
    You can actually combine this with the return statement below.
  7. reviewboard/webapi/resources.py (Diff revision 1)
     
     
     
     
    The keys should all be lowercase.
  8. reviewboard/webapi/resources.py (Diff revision 1)
     
     
    Should be review_requests.
  9. reviewboard/webapi/resources.py (Diff revision 1)
     
     
     
     
     
    This needs to be 2 blank lines between each.
  10. 
      
david
  1. Is this superceded by http://reviews.reviewboard.org/r/2198/ ? If so, can you close this as "Discarded"?
  2. 
      
Loading...