You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$%7Bart_info.art.src%7D?q=api&page=60&format=json
For typeahead suggestions, use the /typeahead
endpoint:
https://codesearch.val.run/typeahead?q=api
Returns an array of strings in format "username" or "username/projectName"
Found 11425 results for "api"(812ms)
13const webhookIdToDelete = "51a2064a0098b4feacadfd7db51f6a21"; // ← Change this
1415async function listWebhooks(apiKey: string, propertyId: string): Promise<CloudbedsWebhook[]> {
16const res = await fetch(`https://hotels.cloudbeds.com/api/v1.2/getWebhooks?propertyID=${propertyId}`, {
17headers: { Authorization: `Bearer ${apiKey}` },
18});
1929}
3031async function deleteWebhookById(apiKey: string, id: string, url: string, object: string, action: string) {
32const body = new URLSearchParams({
33subscriptionID: id,
37});
3839const res = await fetch("https://hotels.cloudbeds.com/api/v1.2/deleteWebhook", {
40method: "POST",
41headers: {
42Authorization: `Bearer ${apiKey}`,
43"Content-Type": "application/x-www-form-urlencoded",
44},
54export default async function() {
55const user = await blob.getJSON(`cloudbeds_user_${userId}`);
56const apiKey = user?.cloudbedsAccounts?.[propertyId]?.apiKey;
57if (!apiKey) throw new Error(`Missing API key for user ${userId} and property ${propertyId}`);
5859const webhooks = await listWebhooks(apiKey, propertyId);
60const match = webhooks.find(w => w.id === webhookIdToDelete);
61if (!match) throw new Error(`Webhook ${webhookIdToDelete} not found on property ${propertyId}`);
6263await deleteWebhookById(
64apiKey,
65match.id,
66match.subscriptionData.url,
9798export async function sendDailyBriefing(chatId?: string, today?: DateTime) {
99// Get API keys from environment
100const apiKey = Deno.env.get("ANTHROPIC_API_KEY");
101const telegramToken = Deno.env.get("TELEGRAM_TOKEN");
102106}
107108if (!apiKey) {
109console.error("Anthropic API key is not configured.");
110return;
111}
122123// Initialize Anthropic client
124const anthropic = new Anthropic({ apiKey });
125126// Initialize Telegram bot
162163// disabled title for now, it seemes unnecessary...
164// await bot.api.sendMessage(chatId, `*${title}*`, { parse_mode: "Markdown" });
165166// Then send the main content
169170if (content.length <= MAX_LENGTH) {
171await bot.api.sendMessage(chatId, content, { parse_mode: "Markdown" });
172// Store the briefing in chat history
173await storeChatMessage(
198// Send each chunk as a separate message and store in chat history
199for (const chunk of chunks) {
200await bot.api.sendMessage(chatId, chunk, { parse_mode: "Markdown" });
201// Store each chunk in chat history
202await storeChatMessage(