Hi,
I'm using the bitbucket API to fetch directory listings from a repo.
With this;
response_city=requests.get('https://api.bitbucket.org/2.0/repositories/company/repo/src/master/SomeDirectory/', auth=('user', 'pass'))I successfully get a long JSON with the contents of SomeDirectory
But know I want to get the listings of SomeDirectory and at the same time the listings inside the directories in someDirectory.
So for example inside SomeDirectory I have:
-SomeDirectory
--Barcelona
---file1.hex
---file2.hex
--Paris
---file3.hex
---file4.hex
--Belgium
---file5.hex
---file6.hex
And I want to see not only the folders but also the files.
This should be easy with the max_depth=2 parameter. So that's what I tried:
response_city=requests.get('https://api.bitbucket.org/2.0/repositories/company/repo/src/master/SomeDirectory/', auth=('user', 'pass'), params={"max_depth":"2"})I have tried both with
params={"max_depth":"2"} and
params={"max_depth":2}and also max_depth=3.
But I still only see the first level of folders. Not the files inside.
What am I doing wrong?