Initial project setup with HTML structure, modular JS, and Ticketmaster event fetching
This commit is contained in:
1 parent
99c211b669
commit
0fe66d8746
10 files changed
+204
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import { fetchEvents } from "../api/ticketmaster.js";
|
||||
|
||||
export async function getEvents(city) {
|
||||
const events = await fetchEvents(city);
|
||||
|
||||
return events.map(event => ({
|
||||
id: event.id,
|
||||
name: event.name,
|
||||
date: event.dates.start.localDate,
|
||||
venue: event._embedded?.venues[0]?.name
|
||||
}));
|
||||
}
|
||||
Reference in new issue
Block a user