-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xola Webhook --> Deputy Shift Creation #12
Conversation
requirements.txt
Outdated
@@ -0,0 +1 @@ | |||
Flask==1.1.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add requests package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 05a96f3
setup.py
Outdated
if __name__ == '__main__': | ||
if path.isfile('xola_deputy/Settings.ini'): | ||
key = input("Do you really wanna change your settings?(y/n) ") | ||
print (key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove print function
xola_deputy/deputy_client.py
Outdated
try: | ||
response = requests.post( | ||
url=url, headers=self.__headers, data=data) | ||
print(response.json()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove print func
url = self.__url + "users/" + self.__user_id + "/hooks" | ||
param = {"eventName": "order.create", "url": self.public_url + "/xola"} | ||
json_mylist = json.dumps(param) | ||
data = f"{json_mylist}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try str func instead f string
:param ticket_count: all tickets which reserved in event | ||
:return: how many new shifts we have to do | ||
""" | ||
if shift_count == 1: # we don`t need divine ticket on guids|do 1 shift |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe will be better change shift_count for default number of shifts to smth like '-1' instead '1'
(in case if in future we will have experience, which provide 1 guide per 1 ticket)
What does it do?
Make subscribe to the XOLA webhook - process data from them - post request to DEPUTY - Verification, who employee free
make post request to DEPUTY shift.
Finish part 1 all
What else do you need to know?
This is PR include issue: #5 , #6 , #7, #8,
WHEN START FIRST TIME U HAVE TO RUN SETUP.PY FILE
Checklist
Ready To Deploy
orReview/QA
FIXME
orTODO
comments. If not, please explain or create issues to resolve it.Demo screenshots or video/animation, if any