|
29 | 29 | ############################################################################### |
30 | 30 | # Settings |
31 | 31 |
|
32 | | -TITO_EVENT = "write-the-docs-portland-2025" |
| 32 | +TITO_EVENT = "write-the-docs-berlin-2025" |
33 | 33 | VENUELESS_PUBLIC_URL = "https://writethedocs.venueless.events/" # include trailing / |
34 | | -VENUELESS_EVENT_SLUG = "wtd25" |
| 34 | +# Pull this from the websocket path in a browser |
| 35 | +VENUELESS_EVENT_SLUG = "wtd252" |
35 | 36 | # If not listed in here, ticket is skipped |
36 | 37 | ACTIVITY_NAME_TO_TRAIT = { |
37 | 38 | "conference": ["onsite"], |
|
70 | 71 | # NOTE: in tito UI, this is called an attendee |
71 | 72 | tickets_response = requests.get( |
72 | 73 | f"https://api.tito.io/v3/writethedocs/{TITO_EVENT}/tickets", |
73 | | - params={"page[size]": 1000, "search[states][]": "complete", "expand": "release,activities"}, |
| 74 | + params={"page[size]": 500, "search[states][]": "complete", "expand": "release,activities"}, |
74 | 75 | headers=headers, |
75 | 76 | ) |
76 | 77 |
|
77 | | -for ticket in tickets_response.json()["tickets"]: |
| 78 | +tito_tickets = tickets_response.json()["tickets"] |
| 79 | +print(f"Found {len(tito_tickets)} tickets.") |
| 80 | + |
| 81 | +for ticket in tito_tickets: |
78 | 82 | ticket_slug = ticket["slug"] |
79 | 83 | ticket_reference = ticket["reference"] |
80 | 84 | venueless_meta = ticket.get("metadata").get("venueless") if ticket.get("metadata") else None |
|
88 | 92 | activity_name = ticket["activities"][0]["name"].lower() |
89 | 93 | traits += ACTIVITY_NAME_TO_TRAIT[activity_name] |
90 | 94 | except (IndexError, KeyError): |
91 | | - continue |
| 95 | + pass |
92 | 96 |
|
93 | 97 | is_staff = ticket["release"]["title"] == "Staff Ticket" |
94 | 98 | print(f'Found ticket {ticket["name"]}: {ticket_reference=} {traits=} {venueless_meta=} {is_staff=}') |
95 | | - if not venueless_meta and is_staff: |
| 99 | + if not venueless_meta: |
96 | 100 | pending_tickets.append((ticket_slug, traits)) |
97 | 101 |
|
98 | 102 | VENUELESS_WSS_URL = f"{VENUELESS_PUBLIC_URL.replace('https', 'wss')}ws/world/{VENUELESS_EVENT_SLUG}/" |
|
0 commit comments