Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/?q=api&page=224&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 12844 results for "api"(1802ms)

templateTwitterAlertREADME.md4 matches

@barbra_ke4627Updated 2 weeks ago
31Refer to [Twitter's search operators](https://socialdata.gitbook.io/docs/twitter-tweets/retrieve-search-results-by-keyword#endpoint-parameters) to fine-tune your query.
32
33### 4. Test API call
34Set `isProd = false` in the code if you are testing, to ensure there are enough tweets to display. <br>
35Toggle it back to `true` when you're ready to run this cron job in production and actuall send notifications.
60
61### NOTE: Usage Limits
62This val uses the SocialData API for Twitter data:
63
64- **Proxies via Val Town's [SocialDataProxy](https://www.val.town/v/stevekrouse/socialDataProxy)**: Limited to 10 cents per day for [**Val Town Pro users**](https://www.val.town/pricing). This API is *only* for Pro users.
65- **Need more calls?** Sign up for your own [SocialData API token](https://socialdata.tools) and configure the [`socialDataSearch`](https://www.val.town/v/stevekrouse/socialDataSearch) function.

Notion_GCal_Sync_1README.md10 matches

@charmaineUpdated 2 weeks ago
11### 1. Google Calendar Setup
121. Create a Google Cloud project at https://console.cloud.google.com/
132. Enable the Google Calendar API
143. Create OAuth2 credentials (client ID and client secret)
154. Set up OAuth consent screen
165. Use the OAuth playground (https://developers.google.com/oauthplayground/) to:
17 - Authorize the Calendar API (https://www.googleapis.com/auth/calendar.readonly)
18 - Exchange authorization code for tokens
19 - Save the refresh token
21### 2. Notion Setup
221. Create a Notion integration at https://www.notion.so/my-integrations
232. Get your Notion API key
243. Create a database in Notion for meeting pages with these properties:
25 - Title (title)
305. Get the database ID from the URL (the part after the workspace name and before the question mark)
31
32### 3. SERP API Setup (for better user information)
331. Sign up for a SERP API account at https://serpapi.com/
342. Get your API key
353. Add it as an environment variable
36
40- `GOOGLE_CLIENT_SECRET`: Your Google OAuth client secret
41- `GOOGLE_REFRESH_TOKEN`: Refresh token for your Google account
42- `NOTION_API_KEY`: Your Notion API key
43- `NOTION_DATABASE_ID`: ID of the Notion database where meeting pages will be created
44- `TEAM_DOMAIN`: Your team's email domain (e.g., "val.town")
45- `SERP_API_KEY`: Your SERP API key for enhanced user information
46
47### 5. Set Cron Schedule
50## Project Structure
51- `index.ts`: Main cron job that runs daily
52- `googleCalendar.ts`: Functions for interacting with Google Calendar API
53- `notion.ts`: Functions for creating and updating Notion pages
54- `userInfo.ts`: Functions for gathering information about meeting participants
593. It identifies meetings with exactly one external participant (not from your team domain)
604. For each user meeting, it:
61 - Gathers information about the participant using their email and SERP API
62 - Creates a Notion page with meeting details and participant information
63 - Adds sections for meeting notes and action items

MiniAppStarter1neynar.ts2 matches

@charmaineUpdated 2 weeks ago
1const baseUrl = "https://api.neynar.com/v2/farcaster/";
2
3export async function fetchNeynarGet(path: string) {
7 "Content-Type": "application/json",
8 "x-neynar-experimental": "true",
9 "x-api-key": "NEYNAR_API_DOCS",
10 },
11 });

MiniAppStarter1index.tsx2 matches

@charmaineUpdated 2 weeks ago
19 }));
20
21app.get("/api/counter/get", async c => c.json(await db.get("counter")));
22app.get("/api/counter/increment", async c => c.json(await db.set("counter", (await db.get("counter") || 0) + 1)));
23
24app.get("/frontend/**/*", c => serveFile(c.req.path, import.meta.url));

MiniAppStarter1image.tsx3 matches

@charmaineUpdated 2 weeks ago
84
85const loadEmoji = (code) => {
86 // const api = `https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/svg/${code.toLowerCase()}.svg`
87 const api = `https://cdn.jsdelivr.net/gh/shuding/fluentui-emoji-unicode/assets/${code.toLowerCase()}_color.svg`;
88 return fetch(api).then((r) => r.text());
89};
90

MiniAppStarter1App.tsx3 matches

@charmaineUpdated 2 weeks ago
53 <div className="">✷ Farcaster mini app manifest + webhook + embed metadata</div>
54 <div className="">✷ Farcaster notifications (storing tokens, sending recurring notifications, ...)</div>
55 <div className="">✷ Neynar API integration for Farcaster data</div>
56 <div className="">✷ Hosted on Val Town (instant deployments on save)</div>
57 <div className="">
67
68function Database() {
69 const queryFn = () => fetch("/api/counter/get").then((r) => r.json());
70 const { data, refetch } = useQuery({ queryKey: ["counter"], queryFn });
71 return (
73 {/* <h2 className="font-semibold">Database Example</h2> */}
74 <div className="">Counter value: {data}</div>
75 <Button variant="outline" onClick={() => fetch("/api/counter/increment").then(refetch)}>
76 Increment
77 </Button>

Notion_GCal_Syncnotion.ts5 matches

@charmaineUpdated 2 weeks ago
18 */
19export async function createMeetingPage(data: MeetingPageData): Promise<string> {
20 const notionApiKey = Deno.env.get("NOTION_API_KEY");
21 const databaseId = Deno.env.get("NOTION_DATABASE_ID");
22
23 if (!notionApiKey || !databaseId) {
24 throw new Error("Missing Notion API credentials in environment variables");
25 }
26
261
262 // Create the page in Notion
263 const response = await fetch("https://api.notion.com/v1/pages", {
264 method: "POST",
265 headers: {
266 "Authorization": `Bearer ${notionApiKey}`,
267 "Notion-Version": "2022-06-28",
268 "Content-Type": "application/json"

Notion_GCal_Sync_1userInfo.ts14 matches

@charmaineUpdated 2 weeks ago
1/**
2 * Functions for gathering information about meeting participants using SERP API
3 */
4
18
19/**
20 * Try to get user information from SERP API
21 */
22async function tryGetSerpApiInfo(email: string, name?: string): Promise<UserInfo | null> {
23 const serpApiKey = Deno.env.get("SERP_API_KEY");
24
25 if (!serpApiKey) {
26 return null;
27 }
38
39 const response = await fetch(
40 `https://serpapi.com/search.json?engine=google&q=${encodeURIComponent(searchQuery)}&api_key=${serpApiKey}`
41 );
42
43 if (!response.ok) {
44 throw new Error(`SERP API error: ${response.status} ${await response.text()}`);
45 }
46
127 return null;
128 } catch (error) {
129 console.error("Error fetching data from SERP API:", error);
130 return null;
131 }
143
144 try {
145 // Try to get company information using SERP API
146 const serpApiKey = Deno.env.get("SERP_API_KEY");
147
148 if (serpApiKey) {
149 const response = await fetch(
150 `https://serpapi.com/search.json?engine=google&q=${encodeURIComponent(domain)}&api_key=${serpApiKey}`
151 );
152
221 */
222export async function getUserInfo(email: string, name?: string): Promise<UserInfo> {
223 // Try to get detailed information from SERP API
224 const serpInfo = await tryGetSerpApiInfo(email, name);
225 if (serpInfo) {
226 return serpInfo;

Notion_GCal_Sync_1notion.ts5 matches

@charmaineUpdated 2 weeks ago
18 */
19export async function createMeetingPage(data: MeetingPageData): Promise<string> {
20 const notionApiKey = Deno.env.get("NOTION_API_KEY");
21 const databaseId = Deno.env.get("NOTION_DATABASE_ID");
22
23 if (!notionApiKey || !databaseId) {
24 throw new Error("Missing Notion API credentials in environment variables");
25 }
26
261
262 // Create the page in Notion
263 const response = await fetch("https://api.notion.com/v1/pages", {
264 method: "POST",
265 headers: {
266 "Authorization": `Bearer ${notionApiKey}`,
267 "Notion-Version": "2022-06-28",
268 "Content-Type": "application/json"

Notion_GCal_Sync_1googleCalendar.ts2 matches

@charmaineUpdated 2 weeks ago
45 }
46
47 const tokenResponse = await fetch("https://oauth2.googleapis.com/token", {
48 method: "POST",
49 headers: {
81
82 const calendarId = "primary"; // Use primary calendar
83 const url = `https://www.googleapis.com/calendar/v3/calendars/${encodeURIComponent(calendarId)}/events?timeMin=${encodeURIComponent(timeMin)}&timeMax=${encodeURIComponent(timeMax)}&singleEvents=true&orderBy=startTime`;
84
85 const response = await fetch(url, {

vapi-minutes-db1 file match

@henrywilliamsUpdated 1 day ago

vapi-minutes-db2 file matches

@henrywilliamsUpdated 1 day ago
papimark21
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration