@@ -32,7 +32,7 @@ def __init__(self, auth_service, base_url: str) -> None:
3232 self ._auth_service = auth_service
3333 self ._auth_service .authenticate ()
3434
35- def post (self , url : str , json : dict = None , ** kwargs ) -> requests .Response :
35+ def post (self , url : str , json : dict = None , params : dict = None , ** kwargs ) -> requests .Response :
3636 """Sends a POST request.
3737
3838 A wrapper for the requests.post method.
@@ -43,6 +43,8 @@ def post(self, url: str, json: dict = None, **kwargs) -> requests.Response:
4343 :type url: str
4444 :param json: A JSON serializable Python object to send in the body of the Request, defaults to None
4545 :type json: dict, optional
46+ :param params: Dictionary of querystring data to attach to the Request, defaults to None
47+ :type params: dict, optional
4648
4749 :raises APIException: an api exception with message and error type code
4850
@@ -54,12 +56,13 @@ def post(self, url: str, json: dict = None, **kwargs) -> requests.Response:
5456 url = self ._add_base_url (url )
5557 headers = self ._generate_headers ()
5658
57- response = requests .post (url , json = json , headers = headers , ** kwargs )
59+ response = requests .post (
60+ url , json = json , headers = headers , params = params , ** kwargs )
5861 handle_error (response )
5962
6063 return response
6164
62- def put (self , url : str , json : dict = None , ** kwargs ) -> requests .Response :
65+ def put (self , url : str , json : dict = None , params : dict = None , ** kwargs ) -> requests .Response :
6366 """Sends a PUT request.
6467
6568 A wrapper for the requests.put method.
@@ -70,6 +73,8 @@ def put(self, url: str, json: dict = None, **kwargs) -> requests.Response:
7073 :type url: str
7174 :param json: A JSON serializable Python object to send in the body of the Request, defaults to None
7275 :type json: dict, optional
76+ :param params: Dictionary of querystring data to attach to the Request, defaults to None
77+ :type params: dict, optional
7378
7479 :raises APIException: an api exception with message and error type code
7580
@@ -81,7 +86,8 @@ def put(self, url: str, json: dict = None, **kwargs) -> requests.Response:
8186 url = self ._add_base_url (url )
8287 headers = self ._generate_headers ()
8388
84- response = requests .put (url , json = json , headers = headers , ** kwargs )
89+ response = requests .put (
90+ url , json = json , headers = headers , params = params , ** kwargs )
8591 handle_error (response )
8692
8793 return response
@@ -95,7 +101,7 @@ def get(self, url: str, params: dict = None, **kwargs) -> requests.Response:
95101
96102 :param url: relative url of the API endpoint
97103 :type url: str
98- :param params: Dictionary, list of tuples or bytes to send in the query string for the Request. defaults to None
104+ :param params: Dictionary of querystring data to attach to the Request, defaults to None
99105 :type params: dict, optional
100106
101107 :raises APIException: an api exception with message and error type code
@@ -113,7 +119,7 @@ def get(self, url: str, params: dict = None, **kwargs) -> requests.Response:
113119
114120 return response
115121
116- def delete (self , url : str , json : dict = None , ** kwargs ) -> requests .Response :
122+ def delete (self , url : str , json : dict = None , params : dict = None , ** kwargs ) -> requests .Response :
117123 """Sends a DELETE request.
118124
119125 A wrapper for the requests.delete method.
@@ -124,6 +130,8 @@ def delete(self, url: str, json: dict = None, **kwargs) -> requests.Response:
124130 :type url: str
125131 :param json: A JSON serializable Python object to send in the body of the Request, defaults to None
126132 :type json: dict, optional
133+ :param params: Dictionary of querystring data to attach to the Request, defaults to None
134+ :type params: dict, optional
127135
128136 :raises APIException: an api exception with message and error type code
129137
@@ -135,7 +143,8 @@ def delete(self, url: str, json: dict = None, **kwargs) -> requests.Response:
135143 url = self ._add_base_url (url )
136144 headers = self ._generate_headers ()
137145
138- response = requests .delete (url , headers = headers , json = json , ** kwargs )
146+ response = requests .delete (
147+ url , headers = headers , json = json , params = params , ** kwargs )
139148 handle_error (response )
140149
141150 return response
0 commit comments