Skip to content

Commit 9905a19

Browse files
author
Ian Boynton
authored
Add example of query param usage (#53)
* Add example of query params and overview * Split into its own example * Fix typo * Don't change formatting * Fix language
1 parent ae5f5ec commit 9905a19

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ JW Platform API library will raise exception inherited from ``jwplatform.errors.
6161
6262
For the complete list of available exception see `jwplatform/errors.py`_ file.
6363

64+
List calls allow for (optional) querying and filtering. This can be done by passing the query parameters as a dict to the `query_params` keyword argument on list calls:
65+
66+
.. code-block:: python
67+
response = jwplatform_client.Media.list(site_id='SITE_ID', query_params={"page": 1, "page_length": 10, "sort": "title:asc", "q": "external_id: abcdefgh"})
68+
69+
All query parameters are optional. `page`, `page_length`, and `sort` parameters default to 1, 10, and "created:dsc", respectively. The `q` parameter allows for filtering on different
70+
attributes and may allow for AND/OR querying depending on the resource. For full documentation on the query syntax and endpoint specific details please refer to developer.jwplayer.com.
71+
72+
6473
Source Code
6574
-----------
6675

0 commit comments

Comments
 (0)