From 572613faee7c48ab64b3ce334c3e222d7f19e64b Mon Sep 17 00:00:00 2001 From: Javier Date: Tue, 2 Jan 2018 11:36:40 +0100 Subject: [PATCH] Added filter limit, defaults to -1 --- woocommerce/api.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/woocommerce/api.py b/woocommerce/api.py index d15a179..ab252fa 100644 --- a/woocommerce/api.py +++ b/woocommerce/api.py @@ -27,6 +27,7 @@ def __init__(self, url, consumer_key, consumer_secret, **kwargs): self.timeout = kwargs.get("timeout", 5) self.verify_ssl = kwargs.get("verify_ssl", True) self.query_string_auth = kwargs.get("query_string_auth", False) + self.filter_limit = kwargs.get("filter_limit", "-1") def __is_ssl(self): """ Check if url use HTTPS """ @@ -81,6 +82,8 @@ def __request(self, method, endpoint, data): data = jsonencode(data, ensure_ascii=False).encode('utf-8') headers["content-type"] = "application/json;charset=utf-8" + url += '?filter[limit]=%s' %(self.filter_limit) + return request( method=method, url=url, pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy