From b8ba8c9f153bf632bc99902d7fc9ff2e1e6fd9c1 Mon Sep 17 00:00:00 2001 From: Anish Bhusal Date: Thu, 7 Mar 2024 12:46:26 -0600 Subject: [PATCH] added sort param in queryparam (#30) --- pynequa/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pynequa/models.py b/pynequa/models.py index 32d8170..5cff155 100644 --- a/pynequa/models.py +++ b/pynequa/models.py @@ -151,6 +151,7 @@ class QueryParams(AbstractParams): open_params: Optional[List[OpenParams]] = field(default_factory=lambda: []) page: Optional[int] = 1 page_size: Optional[int] = 10 + sort: Optional[str] = None tab: Optional[str] = None scope: Optional[str] = None basket: Optional[str] = None @@ -214,6 +215,9 @@ def _prepare_query_args(self, query_name: str) -> Dict: else: params["pageSize"] = self.page_size + if self.sort is not None: + params["sort"] = self.sort + if self.tab is not None: params["tab"] = self.tab