1313 LanguagesDetails ,
1414 GlossarySchemaRequest ,
1515)
16+ from crowdin_api .sorting import Sorting
1617
1718
1819class GlossariesResource (BaseResource ):
@@ -38,6 +39,7 @@ def get_glossaries_path(self, glossaryId: Optional[int] = None):
3839
3940 def list_glossaries (
4041 self ,
42+ orderBy : Optional [Sorting ] = None ,
4143 groupId : Optional [int ] = None ,
4244 page : Optional [int ] = None ,
4345 offset : Optional [int ] = None ,
@@ -50,7 +52,7 @@ def list_glossaries(
5052 https://developer.crowdin.com/api/v2/#operation/api.glossaries.getMany
5153 """
5254
53- params = {"groupId" : groupId }
55+ params = {"orderBy" : orderBy , " groupId" : groupId }
5456 params .update (self .get_page_params (page = page , offset = offset , limit = limit ))
5557
5658 return self ._get_entire_data (
@@ -239,6 +241,7 @@ def get_terms_path(self, glossaryId: int, termId: Optional[int] = None):
239241 def list_terms (
240242 self ,
241243 glossaryId : int ,
244+ orderBy : Optional [Sorting ] = None ,
242245 userId : Optional [int ] = None ,
243246 languageId : Optional [str ] = None ,
244247 conceptId : Optional [int ] = None ,
@@ -254,6 +257,7 @@ def list_terms(
254257 """
255258
256259 params = {
260+ "orderBy" : orderBy ,
257261 "userId" : userId ,
258262 "languageId" : languageId ,
259263 "conceptId" : conceptId ,
@@ -302,7 +306,7 @@ def add_term(
302306 "gender" : gender ,
303307 "note" : note ,
304308 "url" : url ,
305- "conceptId" : conceptId
309+ "conceptId" : conceptId ,
306310 },
307311 )
308312
@@ -377,8 +381,9 @@ def get_concepts_path(self, glossaryId: int, conceptId: Optional[int] = None):
377381 def list_concepts (
378382 self ,
379383 glossaryId : int ,
384+ orderBy : Optional [Sorting ] = None ,
380385 offset : Optional [int ] = None ,
381- limit : Optional [int ] = None
386+ limit : Optional [int ] = None ,
382387 ):
383388 """
384389 List Concepts.
@@ -387,10 +392,13 @@ def list_concepts(
387392 https://developer.crowdin.com/api/v2/#operation/api.glossaries.concepts.getMany
388393 """
389394
395+ params = {"orderBy" : orderBy }
396+ params .update (self .get_page_params (offset = offset , limit = limit ))
397+
390398 return self ._get_entire_data (
391399 method = "get" ,
392400 path = self .get_concepts_path (glossaryId = glossaryId ),
393- params = self . get_page_params ( offset = offset , limit = limit ) ,
401+ params = params ,
394402 )
395403
396404 def get_concept (self , glossaryId : int , conceptId : int ):
0 commit comments