Skip to content

Commit 05ac499

Browse files
committed
Modified API blueprints of Tickets and ticket tags
1 parent 3c7d8c1 commit 05ac499

File tree

2 files changed

+26
-27
lines changed

2 files changed

+26
-27
lines changed

docs/api/api_blueprint.apib

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14495,7 +14495,7 @@ Delete a single ticket.
1449514495
+ filter (optional, string, `[]`) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more.
1449614496

1449714497

14498-
### List Tickets [GET]
14498+
### List Tickets under an Event [GET]
1449914499

1450014500
+ Request
1450114501

@@ -14583,7 +14583,7 @@ Delete a single ticket.
1458314583
+ filter (optional, string, `[]`) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more.
1458414584

1458514585

14586-
### List Tickets [GET]
14586+
### List Tickets under a Ticket-tag [GET]
1458714587

1458814588
+ Request
1458914589

@@ -14671,7 +14671,7 @@ Delete a single ticket.
1467114671
+ filter (optional, string, `[]`) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more.
1467214672

1467314673

14674-
### List Tickets [GET]
14674+
### List Tickets for an Access Code [GET]
1467514675

1467614676
+ Request
1467714677

@@ -14758,7 +14758,7 @@ Delete a single ticket.
1475814758
+ filter (optional, string, `[]`) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more.
1475914759

1476014760

14761-
### List Tickets [GET]
14761+
### List Tickets for a Discount Code [GET]
1476214762

1476314763
+ Request
1476414764

@@ -14843,7 +14843,7 @@ Delete a single ticket.
1484314843
+ Parameters
1484414844
+ order_identifier: 7201904e (string) - Indetifier of the order
1484514845

14846-
### List Tickets [GET]
14846+
### List Tickets for an Order [GET]
1484714847

1484814848
+ Request
1484914849

@@ -15141,7 +15141,7 @@ Delete a single ticket tag.
1514115141
+ sort (optional, string, `name`) - Sort the resources according to the given attribute in ascending order. Append '-' to sort in descending order.
1514215142
+ filter (optional, string, `[]`) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more.
1514315143

15144-
### List all Ticket Tags [GET]
15144+
### List Ticket Tags under an Event [GET]
1514515145

1514615146
+ Request (application/vnd.api+json)
1514715147

@@ -15200,7 +15200,7 @@ Delete a single ticket tag.
1520015200
+ sort (optional, string, `name`) - Sort the resources according to the given attribute in ascending order. Append '-' to sort in descending order.
1520115201
+ filter (optional, string, `[]`) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more.
1520215202

15203-
### List all Ticket Tags [GET]
15203+
### List Ticket Tags for a Ticket [GET]
1520415204

1520515205
+ Request (application/vnd.api+json)
1520615206

tests/hook_main.py

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1638,7 +1638,7 @@ def ticket_delete(transaction):
16381638
db.session.commit()
16391639

16401640

1641-
@hooks.before("Tickets > List Tickets under an Event > List Tickets")
1641+
@hooks.before("Tickets > List Tickets under an Event > List Tickets under an Event")
16421642
def ticket_event(transaction):
16431643
"""
16441644
GET /events/1/tickets
@@ -1651,7 +1651,7 @@ def ticket_event(transaction):
16511651
db.session.commit()
16521652

16531653

1654-
@hooks.before("Tickets > List Tickets under a Ticket-tag > List Tickets")
1654+
@hooks.before("Tickets > List Tickets under a Ticket-tag > List Tickets under a Ticket-tag")
16551655
def tikcet_tag_ticket(transaction):
16561656
"""
16571657
GET /tikcet-tags/1/tickets
@@ -1664,7 +1664,7 @@ def tikcet_tag_ticket(transaction):
16641664
db.session.commit()
16651665

16661666

1667-
@hooks.before("Tickets > List Tickets for an Access Code > List Tickets")
1667+
@hooks.before("Tickets > List Tickets for an Access Code > List Tickets for an Access Code")
16681668
def access_code_ticket(transaction):
16691669
"""
16701670
GET /access-codes/1/tickets
@@ -1677,7 +1677,7 @@ def access_code_ticket(transaction):
16771677
db.session.commit()
16781678

16791679

1680-
@hooks.before("Tickets > List Tickets for a Discount Code > List Tickets")
1680+
@hooks.before("Tickets > List Tickets for a Discount Code > List Tickets for a Discount Code")
16811681
def discount_code_ticket(transaction):
16821682
"""
16831683
GET /discount-codes/1/tickets
@@ -1690,6 +1690,19 @@ def discount_code_ticket(transaction):
16901690
db.session.commit()
16911691

16921692

1693+
@hooks.before("Tickets > List Tickets for an Order > List Tickets for an Order")
1694+
def get_tickets_from_order(transaction):
1695+
"""
1696+
GET /v1/orders/{identifier}/tickets
1697+
:param transaction:
1698+
:return:
1699+
"""
1700+
with stash['app'].app_context():
1701+
order = OrderFactory()
1702+
order.identifier = "7201904e"
1703+
db.session.add(order)
1704+
db.session.commit()
1705+
16931706
# ------------------------- Ticket Fees -------------------------
16941707
@hooks.before("Ticket Fees > Ticket Fees Collection > List Ticket Fees")
16951708
def ticket_fees_get_list(transaction):
@@ -1809,7 +1822,7 @@ def ticket_tag_delete(transaction):
18091822
db.session.commit()
18101823

18111824

1812-
@hooks.before("Ticket Tags > List Ticket Tags under an Event > List all Ticket Tags")
1825+
@hooks.before("Ticket Tags > List Ticket Tags under an Event > List Ticket Tags under an Event")
18131826
def ticket_tag_event(transaction):
18141827
"""
18151828
GET /events/1/ticket-tags
@@ -1822,7 +1835,7 @@ def ticket_tag_event(transaction):
18221835
db.session.commit()
18231836

18241837

1825-
@hooks.before("Ticket Tags > List Ticket Tags for a Ticket > List all Ticket Tags")
1838+
@hooks.before("Ticket Tags > List Ticket Tags for a Ticket > List Ticket Tags for a Ticket")
18261839
def ticket_tag_ticket(transaction):
18271840
"""
18281841
GET /tickets/1/ticket-tags
@@ -4150,20 +4163,6 @@ def get_event_from_order(transaction):
41504163
db.session.commit()
41514164

41524165

4153-
@hooks.before("Tickets > List Tickets for an Order > List Tickets")
4154-
def get_tickets_from_order(transaction):
4155-
"""
4156-
GET /v1/orders/{identifier}/tickets
4157-
:param transaction:
4158-
:return:
4159-
"""
4160-
with stash['app'].app_context():
4161-
order = OrderFactory()
4162-
order.identifier = "7201904e"
4163-
db.session.add(order)
4164-
db.session.commit()
4165-
4166-
41674166
@hooks.before("Attendees > List Attendees under an order > List All Attendees under an order")
41684167
def get_attendees_from_order(transaction):
41694168
"""

0 commit comments

Comments
 (0)