Querying
Every .get() method in the SDK accepts an optional filter dict. The filter follows the LoopBack query syntax used by the MagicFeedback API.
Basic structure
Section titled “Basic structure”filter = { "where": {…}, "limit": 50, "skip": 0, "order": "createdAt DESC", "fields": {…}, "include": […],}All keys are optional. Pass only the ones you need.
Filtering by field value
Section titled “Filtering by field value”contacts = client.contacts.get({ "where": { "companyId": "YOUR_COMPANY_ID", }})Multiple conditions in where are combined as AND:
feedbacks = client.feedbacks.get({ "where": { "companyId": "YOUR_COMPANY_ID", "type": "APP", }})Pagination
Section titled “Pagination”Use limit and skip for paginated requests:
page_1 = client.feedbacks.get({"limit": 20, "skip": 0})page_2 = client.feedbacks.get({"limit": 20, "skip": 20})Sorting
Section titled “Sorting”feedbacks = client.feedbacks.get({ "order": "createdAt DESC", "limit": 10,})Selecting specific fields
Section titled “Selecting specific fields”Return only the fields you need to reduce payload size:
contacts = client.contacts.get({ "fields": { "id": True, "email": True, }})Combining conditions
Section titled “Combining conditions”result = client.feedbacks.get({ "where": {"companyId": "YOUR_COMPANY_ID"}, "order": "createdAt DESC", "limit": 50, "skip": 0,})