waaavepoolregistermain.tsx5 matches
51// mailgun credentials from environment
52const MAILGUN_DOMAIN = Deno.env.get("MAILGUN_DOMAIN");
53const MAILGUN_API_KEY = Deno.env.get("MAILGUN_API_KEY");
54const FROM_EMAIL = "registration@videosynthesisecosphere.com";
5556if (!MAILGUN_DOMAIN || !MAILGUN_API_KEY) {
57throw new Error("Mailgun credentials not configured");
58}
76formData.append("text", emailBody);
7778const response = await fetch(`https://api.mailgun.net/v3/${MAILGUN_DOMAIN}/messages`, {
79method: "POST",
80headers: {
81"Authorization": `Basic ${btoa(`api:${MAILGUN_API_KEY}`)}`,
82},
83body: formData,
86if (!response.ok) {
87const errorText = await response.text();
88throw new Error(`Mailgun API error: ${response.status} - ${errorText}`);
89}
90
cardamomShoppingListView.tsx3 matches
19setLoading(true);
20try {
21const response = await fetch(`/api/shopping-lists/items/${itemId}`, {
22method: "PUT",
23headers: {
55setLoading(true);
56try {
57const response = await fetch(`/api/shopping-lists/${shoppingList.id}`, {
58method: "PUT",
59headers: {
95setLoading(true);
96try {
97const response = await fetch(`/api/shopping-lists/${shoppingList.id}`, {
98method: "DELETE",
99});
llm-tipsExamplePage.tsx10 matches
7const [votes, setVotes] = useState({ whisper: 0, assembly: 0, local: 0 });
8const [userVotes, setUserVotes] = useState(0);
9const [apiKey, setApiKey] = useState('');
10const [youtubeUrl, setYoutubeUrl] = useState('');
11const [curlCommand, setCurlCommand] = useState('');
2122const generateCurlCommand = () => {
23if (!apiKey || !youtubeUrl) return alert('Please enter both API key and YouTube URL');
24setCurlCommand(
25`curl -X GET 'https://api.supadata.ai/v1/youtube/transcript?url=${encodeURIComponent(
26youtubeUrl
27)}&text=true' \\\n -H 'x-api-key: ${apiKey}'`
28);
29};
61>
62{m === 'notebook' && 'Method A: NotebookLM'}
63{m === 'yt-transcript' && 'Method B: Supadata API'}
64{m === 'vote' && 'Method C: Vote for New Method!'}
65</button>
89<div className="bg-gray-100 p-6 rounded-lg mb-6">
90<div className="mb-4">
91<label className="block text-sm font-medium text-gray-700 mb-2">Supadata API Key:</label>
92<input
93type="password"
94value={apiKey}
95onChange={(e) => setApiKey(e.target.value)}
96className="w-full px-3 py-2 border rounded-md"
97placeholder="sd_your_api_key_here"
98/>
99</div>
132<div className="flex justify-between items-center">
133<div>
134<h5 className="font-medium capitalize">{opt}</h5>
135<p className="text-sm text-gray-600">
136{opt === 'whisper' && 'Direct audio transcription using Whisper'}
40setState(prev => ({ ...prev, loading: true, error: null }));
41try {
42const response = await fetch('/api/recipes');
43const data = await response.json();
44
68setState(prev => ({ ...prev, loading: true, error: null }));
69try {
70const response = await fetch('/api/shopping-lists');
71const data = await response.json();
72
cardamomshopping-lists.ts24 matches
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import type { ShoppingList, ShoppingListItem, CreateShoppingListRequest, ApiResponse } from "../../shared/types.ts";
3import {
4createShoppingList as dbCreateShoppingList,
18try {
19const lists = await getAllShoppingLists();
20return c.json({ success: true, data: lists } as ApiResponse<ShoppingList[]>);
21} catch (error) {
22console.error('Error fetching shopping lists:', error);
23return c.json({ success: false, error: 'Failed to fetch shopping lists' } as ApiResponse, 500);
24}
25});
30const id = parseInt(c.req.param('id'));
31if (isNaN(id)) {
32return c.json({ success: false, error: 'Invalid shopping list ID' } as ApiResponse, 400);
33}
3435const list = await getShoppingListById(id);
36if (!list) {
37return c.json({ success: false, error: 'Shopping list not found' } as ApiResponse, 404);
38}
3940return c.json({ success: true, data: list } as ApiResponse<ShoppingList>);
41} catch (error) {
42console.error('Error fetching shopping list:', error);
43return c.json({ success: false, error: 'Failed to fetch shopping list' } as ApiResponse, 500);
44}
45});
54success: false,
55error: 'At least one recipe ID is required'
56} as ApiResponse, 400);
57}
5863success: false,
64error: 'All recipe IDs must be valid numbers'
65} as ApiResponse, 400);
66}
677677const list = await dbCreateShoppingList(listName, validRecipeIds);
78return c.json({ success: true, data: list } as ApiResponse<ShoppingList>, 201);
79} catch (error) {
80console.error('Error creating shopping list:', error);
81return c.json({ success: false, error: 'Failed to create shopping list' } as ApiResponse, 500);
82}
83});
88const id = parseInt(c.req.param('id'));
89if (isNaN(id)) {
90return c.json({ success: false, error: 'Invalid shopping list ID' } as ApiResponse, 400);
91}
9297success: false,
98error: 'Shopping list name is required'
99} as ApiResponse, 400);
100}
101102const success = await updateShoppingListName(id, name.trim());
103if (!success) {
104return c.json({ success: false, error: 'Shopping list not found' } as ApiResponse, 404);
105}
106107// Return the updated shopping list
108const updatedList = await getShoppingListById(id);
109return c.json({ success: true, data: updatedList } as ApiResponse<ShoppingList>);
110} catch (error) {
111console.error('Error updating shopping list name:', error);
112return c.json({ success: false, error: 'Failed to update shopping list name' } as ApiResponse, 500);
113}
114});
119const id = parseInt(c.req.param('id'));
120if (isNaN(id)) {
121return c.json({ success: false, error: 'Invalid item ID' } as ApiResponse, 400);
122}
123126const success = await updateShoppingListItem(id, updates);
127if (!success) {
128return c.json({ success: false, error: 'Item not found or no changes made' } as ApiResponse, 404);
129}
130131return c.json({ success: true, data: { updated: true } } as ApiResponse);
132} catch (error) {
133console.error('Error updating shopping list item:', error);
134return c.json({ success: false, error: 'Failed to update item' } as ApiResponse, 500);
135}
136});
141const id = parseInt(c.req.param('id'));
142if (isNaN(id)) {
143return c.json({ success: false, error: 'Invalid shopping list ID' } as ApiResponse, 400);
144}
145146const deleted = await deleteShoppingList(id);
147if (!deleted) {
148return c.json({ success: false, error: 'Shopping list not found' } as ApiResponse, 404);
149}
150151return c.json({ success: true, data: { deleted: true } } as ApiResponse);
152} catch (error) {
153console.error('Error deleting shopping list:', error);
154return c.json({ success: false, error: 'Failed to delete shopping list' } as ApiResponse, 500);
155}
156});
59// description: val.description,
60// url: val.links.html,
61// apiUrl: val.links.self
62// })),
63allVals: vals.map(val => val),
llm-tipsexample.tsx10 matches
6const [votes, setVotes] = useState({ whisper: 0, assembly: 0, local: 0 });
7const [userVotes, setUserVotes] = useState(0);
8const [apiKey, setApiKey] = useState('');
9const [youtubeUrl, setYoutubeUrl] = useState('');
10const [curlCommand, setCurlCommand] = useState('');
2021const generateCurlCommand = () => {
22if (!apiKey || !youtubeUrl) return alert('Please enter both API key and YouTube URL');
23setCurlCommand(
24`curl -X GET 'https://api.supadata.ai/v1/youtube/transcript?url=${encodeURIComponent(
25youtubeUrl
26)}&text=true' \\\n -H 'x-api-key: ${apiKey}'`
27);
28};
60>
61{m === 'notebook' && 'Method A: NotebookLM'}
62{m === 'yt-transcript' && 'Method B: Supadata API'}
63{m === 'vote' && 'Method C: Vote for New Method!'}
64</button>
88<div className="bg-gray-100 p-6 rounded-lg mb-6">
89<div className="mb-4">
90<label className="block text-sm font-medium text-gray-700 mb-2">Supadata API Key:</label>
91<input
92type="password"
93value={apiKey}
94onChange={(e) => setApiKey(e.target.value)}
95className="w-full px-3 py-2 border rounded-md"
96placeholder="sd_your_api_key_here"
97/>
98</div>
131<div className="flex justify-between items-center">
132<div>
133<h5 className="font-medium capitalize">{opt}</h5>
134<p className="text-sm text-gray-600">
135{opt === 'whisper' && 'Direct audio transcription using Whisper'}
Glimpsedatabase.api.routes.ts0 matches
1import { Hono } from "npm:hono";
2import { getDatabase } from "../../controllers/database.controller.ts";
34const app = new Hono();
5
3// Initialize Notion client
4const notion = new Client({
5auth: Deno.env.get("NOTION_API_KEY"),
6});
7
llm-tipsexample.html16 matches
74onclick="selectMethod('yt-transcript')"
75>
76Method B: Supadata API
77</button>
78<button
113<div id="yt-transcript-method" class="method-content bg-gray-100 p-6 rounded-lg mb-6 hidden">
114<p class="text-base text-gray-600 mb-4">
115Use Supadata's API to get YouTube transcripts programmatically:
116</p>
117
118<div class="mb-4">
119<label for="apiKey" class="block text-sm font-medium text-gray-700 mb-2">
120Supadata API Key:
121</label>
122<input
123type="password"
124id="apiKey"
125placeholder="sd_your_api_key_here"
126class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
127/>
128<p class="text-xs text-gray-500 mt-1">
129Get your API key from <a href="https://supadata.ai" target="_blank" class="text-blue-600 underline">supadata.ai</a>
130</p>
131</div>
165<div class="mt-4 p-3 bg-blue-50 rounded border-l-4 border-blue-400">
166<p class="text-sm text-blue-700">
167<strong>Tip:</strong> This API method gives you clean transcript data that you can pipe directly into vim or save to a file for processing.
168</p>
169</div>
183<div class="flex justify-between items-center">
184<div>
185<h5 class="font-medium">OpenAI Whisper API</h5>
186<p class="text-sm text-gray-600">Direct audio transcription using Whisper</p>
187</div>
299300function generateCurlCommand() {
301const apiKey = document.getElementById('apiKey').value;
302const youtubeUrl = document.getElementById('youtubeUrl').value;
303
304if (!apiKey || !youtubeUrl) {
305alert('Please enter both API key and YouTube URL');
306return;
307}
308309const curlCommand = `curl -X GET 'https://api.supadata.ai/v1/youtube/transcript?url=${encodeURIComponent(youtubeUrl)}&text=true' \\
310-H 'x-api-key: ${apiKey}'`;
311
312document.getElementById('curlCommand').textContent = curlCommand;
347{ NEW YOUTUBE SOURCE
348349Excerpts from the transcript of the video "AI Snake Oil: What Artificial Intelligence Can Do, What It Can't, and How to Tell the Difference" uploaded on the YouTube channel "MIT Shaping the Future of Work Initiative":
350351[1] ASU OZDAGLAR: Maybe we should get started, right? Hi, everyone. It's a pleasure to welcome you all to tonight's talk with Professor Arvind Narayanan. The Schwarzman College of Computing is honored to co-host this event with MIT's Shaping the Future of Work Initiative...</pre>
352</div>
353