Skip to content

Commit

Permalink
Add a request route for events that a company is attending. (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShawnCZek authored Jan 21, 2025
1 parent ac688d8 commit 479b720
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions web/v2/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export interface APIGameEventIndex {
* @see https://truckersmp.com/developers/api#operation/get-v2-events
* @see https://truckersmp.com/developers/api#operation/get-user-id-events
* @see https://truckersmp.com/developers/api#operation/get-vtc-id-events
* @see https://truckersmp.com/developers/api#operation/get-vtc-id-events-attending
*/
export interface APIGameEventSimple extends Omit<APIGameEvent, 'attendances'> {
/**
Expand Down
12 changes: 12 additions & 0 deletions web/v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ export const APIWebRoutes = {
return `/vtc/${companyId}/events` as const;
},

/**
* Route for:
* - GET `/vtc/{companyId}/events/attending`
*
* @param companyId Unique identifier of a company. Can also be its slug.
*
* @returns APIResponse<APIGameEventSimple[]>
*/
companyEventsAttending(companyId: number | string) {
return `vtc/${companyId}/events/attending` as const;
},

/**
* Route for:
* - GET `/vtc/{companyId}/events/{eventId}`
Expand Down

0 comments on commit 479b720

Please sign in to comment.