On Mon, 13 May 2013 09:42:24 -0700 (PDT), Jody <josephwinston...@gmail.com>
wrote:
> I'm confused on how to find if a submitted review has a "ship it" 
> associated it with it.  Does someone have a python fragment that shows
how 
> to extract this information along with the person who voted to press
"ship 
> it?"
> 
> Here's what I have so far:
> 
> from rbtools.api.client import RBClient
> 
> client = RBClient("http://iternal_url";)
> root = client.get_root()
> 
> requests = root.get_review_requests(status="submitted")
> review = requests[0]
> print "Review status =", review.status
> print "Review description =", review.description
> 
> submitter = review.get_submitter()
> print "Submitter =", submitter.fullname
> 
> target_groups = review.target_groups
> for group in target_groups:
>     print "\tGroup =", group.title
> 
> target_people = review.target_people
> for people in target_people:
>     print "\tPeople =", people.title


The review object itself has the ship_it attribute which you can see here:
http://www.reviewboard.org/docs/manual/dev/webapi/2.0/resources/review/

Above, you named "review" to be the first "review request" object which is
probably why you are confused. The review request is opened by the
submitter and contains zero or more reviews. Once you have the review
object, use its link to the user object to get the poster for that review.
There are no specific python docs for these tasks, but I agree it certainly
would be nice to have more examples.

Cheers,
M


-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to