Skip to content

Commit

Permalink
feat: add a qrcode data method
Browse files Browse the repository at this point in the history
  • Loading branch information
Thungghuan committed Oct 8, 2022
1 parent 0ce251e commit f8ca886
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/bus.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from unittest import result
import requests


Expand Down Expand Up @@ -65,3 +66,8 @@ def reserve_bus(self, tickets):
result = self.session.post(url, json=tickets).json()

return result

def qrcode_data(self, ticket_id):
result = self.ticket_detail(ticket_id)["data"]

return {"id": result["id"], "frequencyId": result["frequencyId"]}

0 comments on commit f8ca886

Please sign in to comment.