Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️
PHP attendize-alternativedoor-managementevent-check-inevent-managementevent-registrationevent-ticketingeventbrite-alternativeeventslaravelopen-sourcephpreactself-hostedsell-ticketssell-tickets-onlineticket-sellingticketing-systemtickettailor-alternativetito-alternative
import {api} from "./client.ts";
import {ApiKeysResponse, CreateApiKeyRequest, CreatedApiKey, GenericDataResponse, IdParam} from "../types.ts";
export const apiKeyClient = {
all: async () => {
const response = await api.get<ApiKeysResponse>('api-keys');
return response.data;
},
create: async (request: CreateApiKeyRequest) => {
const response = await api.post<GenericDataResponse<CreatedApiKey>>('api-keys', request);
return response.data.data;
},
delete: async (apiKeyId: IdParam) => {
await api.delete(`api-keys/${apiKeyId}`);
},
};