Skip to content

Commit

Permalink
Merge pull request #16 from pjpiwowarski/named-query-parameters
Browse files Browse the repository at this point in the history
Fix named queries with mandatory parameters
cbini authored Feb 14, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents b8082fd + 43a56ca commit 85643d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion powerschool/client.py
Original file line number Diff line number Diff line change
@@ -150,21 +150,23 @@ def count(self, **kwargs):
k: kwargs.get(k)
for k in ["q", "students_to_include", "teachers_to_include"]
}

response = self.client._request(
method=self.query_method,
path=f"{self.path}/count",
params=params,
data=body,
)

return response.get("count")

def query(self, **kwargs):
"""
Performs a query on a table and returns either a single row or paged results.
"""
pk = kwargs.pop("pk", None)
body = kwargs.pop("body", {})

body = kwargs.get("body", {})
projection = kwargs.get("projection")
page_size = kwargs.get("pagesize")
page = kwargs.get("page")

0 comments on commit 85643d9

Please sign in to comment.