tixbit 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 TixBit, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,237 @@
1
+ # tixbit
2
+
3
+ Search events, view seatmaps, browse listings, and buy tickets on [TixBit](https://tixbit.com) — from the terminal, your code, or an AI agent.
4
+
5
+ No API key required.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ # Use instantly with npx (no install)
11
+ npx tixbit search "Hawks" --state GA
12
+
13
+ # Or install globally
14
+ npm install -g tixbit
15
+ tixbit search "Hawks" --state GA
16
+
17
+ # Or add to a project
18
+ npm install tixbit
19
+ ```
20
+
21
+ ## CLI
22
+
23
+ ### Search events
24
+
25
+ ```sh
26
+ tixbit search "Taylor Swift"
27
+ tixbit search "Hawks" --state GA --size 5
28
+ tixbit search --city "New York" --category nba-basketball
29
+ tixbit search --start-date 2025-06-01 --end-date 2025-06-30
30
+ ```
31
+
32
+ ### Browse local events
33
+
34
+ ```sh
35
+ tixbit browse --city Atlanta --state GA
36
+ tixbit browse --lat 33.749 --lng -84.388 --category CONCERT
37
+ ```
38
+
39
+ ### Get ticket listings
40
+
41
+ ```sh
42
+ tixbit listings 4BKJMDZ
43
+ tixbit listings 4BKJMDZ --size 5 --sort asc
44
+ ```
45
+
46
+ ### Buy tickets
47
+
48
+ ```sh
49
+ # Get a checkout link for a listing
50
+ tixbit checkout P2JO5OBX --quantity 2
51
+ ```
52
+
53
+ ```
54
+ 🎟 Checkout Link
55
+
56
+ Listing: P2JO5OBX
57
+ Section: 214 Row E
58
+ Price: $23.80 × 2 = $47.60
59
+ Quantity: 2
60
+
61
+ https://tixbit.com/checkout/process?listing=P2JO5OBX&quantity=2
62
+
63
+ Open the link above in your browser to complete checkout.
64
+ ```
65
+
66
+ ### View venue seatmap
67
+
68
+ ```sh
69
+ tixbit seatmap 4BKJMDZ
70
+ tixbit seatmap 4BKJMDZ --section 214
71
+ ```
72
+
73
+ ```
74
+ 🏟 State Farm Arena
75
+ NBA - Atlanta Hawks
76
+ Capacity: 18,118
77
+
78
+ ── ⬇ Lower Level (100s) ──
79
+ 101 102 103 ... 122
80
+
81
+ ── ⬆ Upper Level (200s) ──
82
+ 201 202 203 ▸214◂ ... 227S
83
+
84
+ 📍 Section 214: right side
85
+
86
+ Total sections: 142
87
+ ```
88
+
89
+ ### JSON output (for agents / scripting)
90
+
91
+ Every command supports `--json` for machine-readable output:
92
+
93
+ ```sh
94
+ tixbit search "concert" --state NY --json
95
+ tixbit listings 4BKJMDZ --json
96
+ tixbit seatmap 4BKJMDZ --json
97
+ tixbit checkout P2JO5OBX --quantity 2 --json
98
+ ```
99
+
100
+ ### All commands
101
+
102
+ | Command | Description |
103
+ |---|---|
104
+ | `search [query]` | Search events by keyword, city, state, category, or date |
105
+ | `browse` | Browse upcoming events near a location |
106
+ | `listings <eventId>` | Get available ticket listings for an event |
107
+ | `checkout <listingId>` | Get a checkout link to buy tickets |
108
+ | `seatmap <eventId>` | Show the venue seating chart with all sections |
109
+ | `url <slug>` | Print the TixBit event page URL |
110
+
111
+ ## SDK
112
+
113
+ Use the client programmatically in any Node.js 20+ project:
114
+
115
+ ```ts
116
+ import { TixBitClient } from "tixbit";
117
+
118
+ const tixbit = new TixBitClient();
119
+
120
+ // Search events
121
+ const { events } = await tixbit.searchEvents({
122
+ query: "Hawks",
123
+ state: "GA",
124
+ size: 5,
125
+ });
126
+
127
+ // Get listings
128
+ const { listings } = await tixbit.getListings({
129
+ eventId: events[0].external_event_id,
130
+ });
131
+
132
+ // Create a checkout link
133
+ const checkout = tixbit.createCheckoutLink({
134
+ listingId: listings[0].id,
135
+ quantity: 2,
136
+ });
137
+ console.log(checkout.url);
138
+ // → "https://tixbit.com/checkout/process?listing=P2JO5OBX&quantity=2"
139
+
140
+ // View seatmap
141
+ const seatmap = await tixbit.getSeatmap({
142
+ eventId: events[0].external_event_id,
143
+ });
144
+ console.log(seatmap.venue_name); // "State Farm Arena"
145
+ console.log(seatmap.section_names); // ["101", "102", ...]
146
+
147
+ // Browse nearby
148
+ const nearby = await tixbit.browse({
149
+ city: "Atlanta",
150
+ state: "GA",
151
+ });
152
+
153
+ // Event URL
154
+ const url = tixbit.eventUrl("4BKJMDZ");
155
+ // → "https://tixbit.com/events/4BKJMDZ"
156
+ ```
157
+
158
+ ## API Reference
159
+
160
+ ### `new TixBitClient(config?)`
161
+
162
+ | Option | Type | Default |
163
+ |---|---|---|
164
+ | `baseUrl` | `string` | `https://tixbit.com` |
165
+ | `timeoutMs` | `number` | `15000` |
166
+ | `apiKey` | `string` | — |
167
+
168
+ ### `searchEvents(params?)`
169
+
170
+ | Param | Type | Description |
171
+ |---|---|---|
172
+ | `query` | `string` | Free-text search |
173
+ | `city` | `string` | City name |
174
+ | `state` | `string` | 2-letter state code |
175
+ | `category` | `string` | Category slug (e.g. `nba-basketball`) |
176
+ | `startDate` | `string` | ISO date — events on/after |
177
+ | `endDate` | `string` | ISO date — events on/before |
178
+ | `page` | `number` | Page number (default: 1) |
179
+ | `size` | `number` | Results per page (default: 25) |
180
+
181
+ ### `browse(params?)`
182
+
183
+ | Param | Type | Description |
184
+ |---|---|---|
185
+ | `city` | `string` | Preferred city |
186
+ | `state` | `string` | Preferred state |
187
+ | `latitude` | `number` | Latitude |
188
+ | `longitude` | `number` | Longitude |
189
+ | `categoryEventType` | `string` | `SPORT`, `CONCERT`, `THEATER`, or `ALL` |
190
+ | `size` | `number` | Number of results (default: 18) |
191
+
192
+ ### `getListings(params)`
193
+
194
+ | Param | Type | Description |
195
+ |---|---|---|
196
+ | `eventId` | `string` | External event ID |
197
+ | `size` | `number` | Page size (default: 50) |
198
+ | `page` | `number` | Page number (default: 1) |
199
+ | `orderByDirection` | `string` | `asc` or `desc` by price |
200
+
201
+ ### `createCheckoutLink(params)`
202
+
203
+ Create a checkout URL for a listing. The user opens this in a browser to complete their purchase on tixbit.com.
204
+
205
+ | Param | Type | Description |
206
+ |---|---|---|
207
+ | `listingId` | `string` | Listing ID to purchase |
208
+ | `quantity` | `number` | Number of tickets (1–8) |
209
+
210
+ Returns `{ url, listingId, quantity }`.
211
+
212
+ ### `getSeatmap(params)`
213
+
214
+ | Param | Type | Description |
215
+ |---|---|---|
216
+ | `eventId` | `string` | External event ID |
217
+
218
+ Returns venue info, section list, zone groupings, and background image URL.
219
+
220
+ ### `eventUrl(slugOrId)`
221
+
222
+ Returns the full URL to the event page on tixbit.com.
223
+
224
+ ## Environment Variables
225
+
226
+ | Variable | Description | Default |
227
+ |---|---|---|
228
+ | `TIXBIT_BASE_URL` | Override the TixBit URL | `https://tixbit.com` |
229
+ | `TIXBIT_API_KEY` | API key (reserved for future use) | — |
230
+
231
+ ## Requirements
232
+
233
+ - Node.js 20+
234
+
235
+ ## License
236
+
237
+ [MIT](LICENSE)