27 lines
1.1 KiB
TypeScript
27 lines
1.1 KiB
TypeScript
import { Hono } from "hono";
|
|
import { fetchQuotes } from "./handlers/fetchQuotes";
|
|
import { getCurrentQuotes } from "./handlers/getCurrentQuotes";
|
|
import { getDailyMinMax } from "./handlers/getDailyMinMax";
|
|
import { getDailyQuotes } from "./handlers/getDailyQuotes";
|
|
import { getHistoricalMinMax } from "./handlers/getHistoricalMinMax";
|
|
import { getMonthlyLast } from "./handlers/getMonthlyLast";
|
|
import { getMonthlyPattern } from "./handlers/getMonthlyPattern";
|
|
import { getPeakHours } from "./handlers/getPeakHours";
|
|
import { getQuoteHistory } from "./handlers/getQuoteHistory";
|
|
import { quoteEvents } from "./handlers/quoteEvents";
|
|
|
|
const app = new Hono();
|
|
|
|
app.get("/", getCurrentQuotes);
|
|
app.get("/monthly-last", getMonthlyLast);
|
|
app.get("/:type/history", getQuoteHistory);
|
|
app.get("/:type/daily", getDailyQuotes);
|
|
app.get("/:type/min-max", getDailyMinMax);
|
|
app.get("/:type/peak-hours", getPeakHours);
|
|
app.get("/:type/monthly-pattern", getMonthlyPattern);
|
|
app.get("/:type/historical/min-max", getHistoricalMinMax);
|
|
app.get("/fetch", fetchQuotes);
|
|
app.get("/events", quoteEvents);
|
|
|
|
export default app;
|