socialDataUpdatemain.tsx1 match
1// This val fetches recent tweets about @SnapAR or Lens Studio, removes duplicates,
2// and displays them as embedded tweets with preview images on a dark background.
3// Updated to use Social Data instead of Twitter API
45import { socialDataSearch } from "https://esm.town/v/stevekrouse/socialDataSearch?v=5";
buildagencymain.tsx1 match
40<title>Build Agency - NEAR Ecosystem</title>
41<meta name="viewport" content="width=device-width, initial-scale=1">
42<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap" rel="stylesheet">
43<style>${css}</style>
44</head>
weekly_mortgage_ratesmain.tsx3 matches
10percentageChange: number;
11}
12const FRED_API_KEY = process.env.FRED_API_KEY;
1314// Function to fetch rate data from FRED API
15async function getRateData(seriesId: string): Promise<RateData> {
16const url =
17`https://api.stlouisfed.org/fred/series/observations?series_id=${seriesId}&api_key=${FRED_API_KEY}&file_type=json&sort_order=desc&limit=2`;
1819const response = await fetch(url);
smoothBluePanthermain.tsx2 matches
12const updateHtml = async () => {
13try {
14const response = await fetch("/api/modify", {
15method: "POST",
16headers: { "Content-Type": "application/json" },
99100async function server(request: Request): Promise<Response> {
101if (request.method === "POST" && new URL(request.url).pathname === "/api/modify") {
102const { html, silliness, slang } = await request.json();
103const client = new Cerebras();
ThreadmarkLISTFetcher2main.tsx10 matches
140141async function fetchThreadmarksFromServer(url, chapterTitles) {
142const response = await fetch("/api/threadmarks", {
143method: "POST",
144headers: {
154}
155156async function getThreadmarkUrls(baseUrl, apiKey) {
157versionLogger(import.meta.url);
158const startTime = Date.now();
166console.log(`[INFO] Constructing URL for category ${category}: ${threadmarkUrl}`);
167168const scrapingBeeUrl = `https://app.scrapingbee.com/api/v1/?api_key=${apiKey}&url=${
169encodeURIComponent(threadmarkUrl)
170}&render_js=false`;
171172const requestStartTime = Date.now();
173const response = await fetch(scrapingBeeUrl);
174const requestDuration = Date.now() - requestStartTime;
175311console.log(`Received ${request.method} request for path: ${new URL(request.url).pathname}`);
312313if (request.method === "POST" && new URL(request.url).pathname === "/api/threadmarks") {
314const apiKey = Deno.env.get("ScrapingBeeAPIkey");
315if (!apiKey) {
316console.error("[ERROR] API key not found in environment variables");
317return new Response(JSON.stringify({ error: "API key not found in environment variables" }), {
318status: 500,
319headers: { "Content-Type": "application/json" },
324const { url, chapterTitles } = await request.json();
325// console.log(`[INFO] Received request to fetch threadmarks for URL: ${url}`);
326const threadmarks = await getThreadmarkUrls(url, apiKey);
327console.log(`[INFO] Retrieved ${threadmarks.length} threadmarks`);
328
124125if (!response.ok) {
126throw new Error(`iTunes API error: ${response.status}`);
127}
128
socialDataSearchREADME.md1 match
1Helper function to call [SocialData](https://socialdata.tools) Twitter Search API, via my proxy: @stevekrouse/socialDataProxy
23Migrated from folder: social_data/socialDataSearch
effortlessCrimsonDolphinmain.tsx2 matches
34const query = "\"val.town\" OR \"val.run\" OR \"val town\" -_ValTown_ -is:retweet -from:valenzuelacity";
5const url = new URL("https://api.socialdata.tools/twitter/search");
67export async function twitterAlert({ lastRunAt }: Interval) {
10url.searchParams.append("query", query + " since_time:" + since);
11const { tweets } = await fetchJSON(url.toString(), {
12bearer: Deno.env.get("SOCIAL_DATA_API_KEY"),
13});
14
effortlessCrimsonDolphinREADME.md3 matches
5## 1. Authentication
67This val gets data from the https://socialdata.tools/ API.
89You'll need to make an account and pre-load your wallet with ~$10.
1011Add your `SOCIAL_DATA_API_KEY` to your [Val Town Envionrment Variables](https://www.val.town/settings/environment-variables).
1213## 2. Query
15Change the `query` variable for what you want to get notified for.
1617You can use [Twitter's search operators](https://developer.twitter.com/en/docs/twitter-api/v1/rules-and-filtering/search-operators) to customize your query, for some collection of keywords, filtering out others, and much more!
1819## 3. Notification
1Migrated from folder: fanficSearcher/ScrapingBeeAttempt/ThreadmarkLISTFetcher2