import express from 'express';
import { createEventsRouter } from './events.routes.js';
import { createMetricsRoutes } from './metrics.routes.js';
import { createCampaignsRouter } from './campaigns.routes.js';
import { createReportingRouter } from './reporting.routes.js';

export function createApiRouter(apiKey, apiRevision) {
  const router = express.Router();

  // Mount routers
  router.use('/events', createEventsRouter(apiKey, apiRevision));
  router.use('/metrics', createMetricsRoutes(apiKey, apiRevision));
  router.use('/campaigns', createCampaignsRouter(apiKey, apiRevision));
  router.use('/reporting', createReportingRouter(apiKey, apiRevision));

  return router;
} 