Hi there,

Hello;

Definitions for these functions don’t actually exist. The Resource class 
(defined in rbtools.api.resource) generates these functions at run time from 
the JSON returned by the Review Board web API.

Each returned JSON response has a “links” field, which contains a a JSON object 
mapping names to URLs and metadata. Each resource name in the links field (e.g. 
diffs) has a get_resource_name (e.g., get_diffs) method created. If you look at 
resource.py:150, you can see the logic where it iterates through the links and 
generates lambdas.

The create function is similar, but we have a special function _create 
(resource.py:31) that handles adding keyword args to the http request and sends 
it.

I hope this answers your questions.
Barret Rennie
> On Apr 21, 2015, at 10:19 PM, XYZ <karthikut...@gmail.com> wrote:
> 
> Hi,
> 
> I am trying to understand the integration of perforce repository with review 
> board.
> I am stuck at one point, i am not able to find the implementation of a 
> particular function.
> 
> Can someone please explain how this function call works:
> 
> In rbtools\command\post.py file, within post_request function :
> 
> review_request = api_root.get_review_requests().create(**request_data)
> 
> Where are these functions? 
> 
> get_review_requests()
> create()
> 
> Similarly, further down :
> review_request.get_diffs().upload_diff(diff_content,**diff_kwargs)
> 
> where is get_diffs() method ?
> 
> Tnx
> 
> -- 
> Supercharge your Review Board with Power Pack: 
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons: 
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> --- 
> 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/d/optout.

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
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/d/optout.

Reply via email to