1export function myApi(name) {
2 return "hi " + name;
3}
1export function expressApiTest(req: express.Request, res: express.Response) {
2 function listAllMembers(obj) {
3 const members = new Set();
11) {
12 const requestSecretToken =
13 req?.options?.headers?.["x-telegram-bot-api-secret-token"];
14 if (requestSecretToken !== bebopBotSecretToken) {
15 res.status(403).send("Access denied");
4
5export let figmaTest1226 = FigmaFileObject(
6 process.env.myFigmaAPIToken,
7 GetFigmaFileKey(
8 "https://www.figma.com/file/XqiternEMTE2Gk8jHzG4Ui/AvatarMixerFileTest?type=design&node-id=0%3A1&mode=design&t=Mpjs48FGMgw77SXW-1",
1export function myApi(name) {
2 return "hi " + name;
3}
12 const encodedCategory = encodeURIComponent(category.replace(/ /g, "_"));
13 const listUrl =
14 `https://en.wikipedia.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:${encodedCategory}&cmlimit=500&format=json&origin=*`;
15 const listResponse = await fetch(listUrl);
16 const listData = await listResponse.json();
25 ].title;
26 const contentUrl =
27 `https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exintro&titles=${
28 encodeURIComponent(randomArticle)
29 }&format=json&utf8=1&origin=*`;
3// Random math fact
4export let mathFact = fetchText(
5 "http://numbersapi.com/random/math"
6);
3// GitHub gists
4export let githubGists = fetchJSON(
5 "https://api.github.com/users/stevekrouse/gists"
6);
1export async function TanaPasteExample(req, res) {
2 // you call this functioin from Tana's make API request
3 // as https://api.val.town/express/@bikefixe.TanaPasteExample?arg=stufftopassin
4 // then you'd call the API where the data you want resides
5 // a search term might've been passed in
6 // const url = https://something@domain.com?searchterm=${req.query.arg}
17 };
18 // then build a string in Tana Paste format.
19 // if you're working from a Make API request command,
20 // then the %%tana%% header isn't required
21 const outputString = `- ${dummy.name} #mysupertag
1export function myApi(name) {
2 return "hi " + name;
3}