UNPKG

mcp-server-ticketmaster

Version:

A Model Context Protocol server for discovering events, venues, and attractions through the Ticketmaster Discovery API

47 lines (46 loc) 1.61 kB
import { SearchType, TicketmasterAttraction, TicketmasterEvent, TicketmasterVenue } from './types.js'; /** * Client for interacting with the Ticketmaster Discovery API */ export declare class TicketmasterClient { private readonly apiKey; private readonly baseUrl; constructor(apiKey: string); /** * Formats a date range for the Ticketmaster API * @param startDate Start of the date range * @param endDate End of the date range * @returns Formatted date range string */ formatDateRange(startDate: Date, endDate: Date): string; /** * Search for events, venues, or attractions * @param type Type of search (event, venue, attraction) * @param query Search query parameters * @returns Array of matching items */ search<T extends TicketmasterEvent | TicketmasterVenue | TicketmasterAttraction>(type: SearchType, query?: { keyword?: string; startDateTime?: Date; endDateTime?: Date; city?: string; stateCode?: string; countryCode?: string; venueId?: string; attractionId?: string; classificationName?: string; size?: number; }): Promise<T[]>; /** * Search for events */ searchEvents(query?: Parameters<typeof this.search>[1]): Promise<TicketmasterEvent[]>; /** * Search for venues */ searchVenues(query?: Parameters<typeof this.search>[1]): Promise<TicketmasterVenue[]>; /** * Search for attractions */ searchAttractions(query?: Parameters<typeof this.search>[1]): Promise<TicketmasterAttraction[]>; }