Skip to content

Commit a0fbf4b

Browse files
Add default limit, context of rate limits
1 parent c470a88 commit a0fbf4b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sdk/diffgram/core/directory.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def init_files(self):
2929
self.file_id_list = self.all_file_ids()
3030

3131

32-
def get_directory_list(self):
32+
def get_directory_list(self, limit=10):
3333
"""
3434
Get a list of available directories for a project
3535
"""
@@ -44,7 +44,11 @@ def get_directory_list(self):
4444
endpoint = "/api/v1/project/" + self.client.project_string_id + \
4545
"/directory/list"
4646

47-
response = self.client.session.get(self.client.host + endpoint)
47+
request_json_body = {'limit': limit}
48+
49+
response = self.client.session.post(
50+
self.client.host + endpoint,
51+
json = request_json_body)
4852

4953
self.client.handle_errors(response)
5054

0 commit comments

Comments
 (0)