crisp-im / python-crisp-api

🐍 Crisp API Python Wrapper
https://docs.crisp.chat/guides/rest-api/
MIT License
27 stars 11 forks source link

List People Profiles doesn't take query string params. #1

Open mcka opened 6 years ago

mcka commented 6 years ago

params can be added to this method client.website.list_people_profiles(website_id, page_number, params) to have all options in the API /website/{website_id}/people/profiles/{page_number}{?sort_field}{&sort_order}{&search_operator}{&search_filter}

matt-takumi commented 6 months ago

It would also be beneficial to have the search_filter option documented.

matt-takumi commented 6 months ago

Alternatively - I noticed that search_people_profiles exists - having search_filter (and other parameters) documented there would be immensely useful.

dinistavares commented 6 months ago

The search_people_profiles works pretty well. The best thing to do in this case is to create the filter in Crisp directly and then inspect the network tab of your browser to view how the query parameters are formed.

For example, if you would like to search for a person based on their email, you can do it like so:

client.website.search_people_profiles(website_id, '1', '[{"criterion":"email","query":["dinis@crisp.chat"],"model":"people","operator":"eq"}]')

Currently I don't think this library includes the option to add the other search parameters such as sort_order, search_operator etc.