@@ -100,7 +100,7 @@ class Postmen(object):
100100 :type proxy: dictionary like in http://docs.python-requests.org/en/latest/user/advanced/#proxies
101101 :param retry: True to retry calls in case of retriable errors
102102 :type retry: bool
103-
103+
104104 :raises PostmenException: if API is missed
105105 :raises PostmenException: if region or endpoint is missed
106106 :raises PostmenException: if version is missed
@@ -122,7 +122,7 @@ def __init__(
122122 self ._endpoint = endpoint if endpoint else 'https://%s-api.postmen.com' % region
123123 self ._headers = {'content-type' : 'application/json' }
124124 self ._headers ['postmen-api-key' ] = api_key
125- self ._headers ['x-postmen-agent' ] = 'python-sdk-1.0 '
125+ self ._headers ['x-postmen-agent' ] = 'python-sdk-1.1 '
126126 self ._raw = raw
127127 self ._safe = safe
128128 self ._time = time
@@ -262,10 +262,10 @@ def call(self, method, path, **kwargs):
262262 :param path: URL path
263263 :type path: str or unicode
264264 :param **kwargs: query, body, raw, safe, time, proxy, retry params
265-
265+
266266 :returns: API data response
267267 :rtype: dict or list or str or unicode
268-
268+
269269 :raises PostmenException: all errors and exceptions
270270 """
271271 retry = kwargs .get ('retry' , self ._retry )
@@ -293,69 +293,69 @@ def getError(self):
293293
294294 def GET (self , path , ** kwargs ):
295295 """Create, perform HTTP GET call to Postmen API, parse and return result.
296-
296+
297297 :param path: URL path
298298 :type path: str or unicode
299299 :param **kwargs: query, raw, safe, time, proxy, retry params from Postmen.call()
300-
300+
301301 :returns: same as Postmen.call()
302302 """
303303 return self .call ('GET' , path , ** kwargs )
304304
305305 def POST (self , path , ** kwargs ):
306306 """Create, perform HTTP POST call to Postmen API, parse and return result.
307-
307+
308308 :param path: URL path
309309 :type path: str or unicode
310310 :param **kwargs: query, raw, safe, time, proxy, retry params from Postmen.call()
311-
311+
312312 :returns: same as Postmen.call()
313313 """
314314 return self .call ('POST' , path , ** kwargs )
315315
316316 def PUT (self , path , ** kwargs ):
317317 """Create, perform HTTP PUT call to Postmen API, parse and return result.
318-
318+
319319 :param path: URL path
320320 :type path: str or unicode
321321 :param **kwargs: query, raw, safe, time, proxy, retry params from Postmen.call()
322-
322+
323323 :returns: same as Postmen.call()
324324 """
325325 return self .call ('PUT' , path , ** kwargs )
326326
327327 def DELETE (self , path , ** kwargs ):
328328 """Create, perform HTTP DELETE call to Postmen API, parse and return result.
329-
329+
330330 :param path: URL path
331331 :type path: str or unicode
332332 :param **kwargs: query, raw, safe, time, proxy, retry params from Postmen.call()
333-
333+
334334 :returns: same as Postmen.call()
335335 """
336336 return self .call ('DELETE' , path , ** kwargs )
337337
338338 def get (self , resource , id_ = None , ** kwargs ):
339339 """List all or retrieve particular resource (e.g. /labels, /labels/:id)
340-
340+
341341 :param resource: resource type (e.g. labels)
342342 :type resource: str or unicode
343343 :param id_: resource id, None to list all resources
344344 :type id_: str or unicode
345-
345+
346346 :returns: same as Postmen.call()
347347 """
348348 method = '%s/%s' % (resource , str (id_ )) if id_ else resource
349349 return self .GET (method , ** kwargs )
350350
351351 def create (self , resource , payload , ** kwargs ):
352352 """Create resource object (e.g. label)
353-
353+
354354 :param resource: resource type (e.g. labels)
355355 :type resource: str or unicode
356356 :param payload: API call payload
357357 :type payload: dict or list or str or unicode
358-
358+
359359 :returns: same as Postmen.call()
360360 """
361361 kwargs ['body' ] = payload
0 commit comments