Revision 92683993 astakosclient/astakosclient/__init__.py
b/astakosclient/astakosclient/__init__.py | ||
---|---|---|
56 | 56 |
API_SERVICE_QUOTAS = "/astakos/api/service_quotas" |
57 | 57 |
API_COMMISSIONS = "/astakos/api/commissions" |
58 | 58 |
API_COMMISSIONS_ACTION = API_COMMISSIONS + "/action" |
59 |
API_FEEDBACK = "/astakos/api/feedback" |
|
59 | 60 |
|
60 | 61 |
|
61 | 62 |
# -------------------------------------------------------------------- |
... | ... | |
323 | 324 |
return self._call_astakos(None, copy(API_RESOURCES)) |
324 | 325 |
|
325 | 326 |
# ---------------------------------- |
327 |
# do a POST to ``API_FEEDBACK`` |
|
328 |
def send_feedback(self, token, message, data): |
|
329 |
"""Send feedback to astakos service |
|
330 |
|
|
331 |
keyword arguments: |
|
332 |
token -- user's token (string) |
|
333 |
message -- Feedback message |
|
334 |
data -- Additional information about service client status |
|
335 |
|
|
336 |
In case of success return nothing. |
|
337 |
Otherwise raise an AstakosClientException |
|
338 |
|
|
339 |
""" |
|
340 |
check_input("send_feedback", self.logger, message=message, data=data) |
|
341 |
path = copy(API_FEEDBACK) |
|
342 |
req_headers = {'content-type': 'application/json'} |
|
343 |
req_body = urllib.urlencode( |
|
344 |
{'feedback_msg': message, 'feedback_data': data}) |
|
345 |
self._call_astakos(token, path, req_headers, req_body, "POST") |
|
346 |
|
|
347 |
# ---------------------------------- |
|
326 | 348 |
# do a GET to ``API_QUOTAS`` |
327 | 349 |
def get_quotas(self, token): |
328 | 350 |
"""Get user's quotas |
Also available in: Unified diff