Hello,
Using Python API Client, it's easy to get the data through a File Diff Resource's get_diff_data function.
root = client.get_root()
files = root.get_files(review_requst_id=review_request_id, diff_revision=2)
diff_data = files[0].get_diff_data()
However, this is always from the perspective of the diff revision compared to the original. I have yet to find (if there is a way) to get it from the perspective of an interdiff.
I've tried setting diff_revision on methods like get_files to '1-2' to mimic the URL used in the frontend to no avail. I don't see methods like those take in an interdiff_revision parameter.
I also walked through the get_diff_context return since that is what is triggered from the GUI when dragging to see interdiffs and it supports a interdiff_revision
diff_context = root.get_diff_context(
review_request_id=review_request_id,
revision=1,
interdiff_revision=2
)
When it is an interdiff, it returns detail like this for each file:
"interfilediff": {
"id": 84062,
"revision": 2
},
I was hoping I could us this detail to get the associated FileDiffResource and call get_diff_data to get the interdiff view data
interdiff_file = root.get_file(
review_request_id=review_request_id,
diff_revision=interfilediff_revision,
filediff_id=interfilediff_id
)
interdiff_file.get_diff_data()
but to no avail it is diff2 to orig file.
Could you confirm whether or not this is possible? I suspect it is not as interdiffs are quite complicated. However, I wanted to check before I potentially go down the path of generating it myself.
Appreciate any insight! Thanks in advance!
Matthew