0

I have a RB root:

api_client = RBClient(...)
root = api_client.get_root()

I can get files associated with a review request via:

files = root.get_files(review_request_id=1, diff_revision=1)

I would like to get information about Reviewers(group, people) for this review request, id 1

What can I do to get that information?

something like root.get_reviewers(review_request_id=1)

ealeon
  • 12,074
  • 24
  • 92
  • 173

1 Answers1

1

You need to first get the review object, from there get to the list of reviewers:

import sys
from rbtools.api.client import RBClient


if __name__ == '__main__':
    client = RBClient('http://reviewboard/')
    root = client.get_root()

    review = root.get_review_request(review_request_id=sys.argv[1])
    for reviewer in review.target_people:
        print '{}, {}'.format(reviewer.title, reviewer.href)
Hai Vu
  • 37,849
  • 11
  • 66
  • 93
  • Thank you! Is there doc some where about the api for review obj so I know what else I can call on – ealeon Dec 17 '15 at 03:51
  • The API is here, but I find out mostly by hand-on calls + trial and error. https://www.reviewboard.org/docs/rbtools/dev/api/#rbtools-api – Hai Vu Dec 17 '15 at 05:20