summaryrefslogtreecommitdiff
path: root/service/pixelated/adapter
diff options
context:
space:
mode:
Diffstat (limited to 'service/pixelated/adapter')
-rw-r--r--service/pixelated/adapter/services/feedback_service.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/service/pixelated/adapter/services/feedback_service.py b/service/pixelated/adapter/services/feedback_service.py
new file mode 100644
index 00000000..87363b12
--- /dev/null
+++ b/service/pixelated/adapter/services/feedback_service.py
@@ -0,0 +1,17 @@
+import requests
+
+
+class FeedbackService(object):
+ def __init__(self, leap_session):
+ self.leap_session = leap_session
+
+ def open_ticket(self, feedback):
+ account_mail = self.leap_session.account_email()
+ data = {
+ "ticket[comments_attributes][0][body]": feedback,
+ "ticket[subject]": "Feedback user-agent from {0}".format(account_mail),
+ "ticket[email]": account_mail,
+ "ticket[regarding_user]": account_mail
+ }
+
+ return requests.post("https://pixelated.wazokazi.is/tickets", files=data, verify=False)