US Congress Stock Trading API examples & templates
Use these vals as a playground to view and fork US Congress Stock Trading API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
whatsappWebhookExample
@hugentobler
HTTP (deprecated)
* Simple, free webhook to start using WhatsApp Platform.
* Handles GET request for verification, and POST request for notifications.
* Meta example: https://glitch.com/edit/#!/whatsapp-cloud-api-echo-bot
*
* Setup:
* 1. Make sure your val name, and thus the val generated HTTP endpoint does not have underscores.
* Underscores present in the endpoint may error out the verification step.
* 2. Set your env variable `WHATSAPP_WEBHOOK_VERIFY_TOKEN`
* Set env variables in val: https://docs.val.town/reference/environment-variables/
* hub.verify_token value: https://developers.facebook.com/docs/graph-api/webhooks/getting-started
*
* Note:
* - As of Mar 2024, Retool webhooks don't support GET requests. So we use val.
audioManager
@yawnxyz
Script
Usage: import { ai } from "https://esm.town/v/yawnxyz/ai";
import { AudioManager } from "https://esm.town/v/yawnxyz/audioManager";
let audio = new AudioManager();
let joke = await ai("tell me a joke in chinese!");
console.log('text', joke)
let result = await audio.textToSpeechUpload(joke, {key: "random-joke.mp3"});
console.log('result:', result)