1
2
3
4
5
6
7
8
9
10
11
import { queryTwitter } from "https://esm.town/v/ted/queryTwitter";
export let twitterPoll = async ({ lastRunAt }) => {
const result = await queryTwitter("hiphop");
const digest: string = result?.data
?.filter((status) => new Date(status.created_at) > new Date(lastRunAt))
.map((status) => status.text)
.join("\n\n\n");
console.email(digest, "Twitter Digest");
};
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023