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.
neverstew
assertBearerToken
Script
assertBearerToken This val can be used to assert that a valid bearer token exists and has been signed by the secret provided. Example const handler = (req, res) => {
const authorization = req.get('authorization');
// throws if invalid
const token = @neverstew.assertBearerToken(@me.secrets.superSecret, authorization);
res.json(token);
}
0
yawnxyz
blobby
Script
Blobby Blobby is a simple wrapper around blob w/ more helpers for scoping, uploading/downloading, writing and reading strings, and so on. Todo Support lunr / semantic search, and embeddings Collections that support pointing to multiple blobs, like {description, embeddings, fileblob, ...} with a shared index / lookup
0
rlesser
Resy_authenticate
Script
Authenticate with Resy This function can be used to generate an authentication token for Resy, which can be used to view favorites, set notifies, or even make reservations. Inputs An AuthParams object containing: email - The email address for your Resy account. Probably best to keep private. password - The password for your Resy account. Definitely keep this private, and place it in a secret . Returns An AuthResponse object containing: id - Your Resy account id. token - Your Resy account token, used to authenticate you in subsequent API calls. See other Resy vals I've made.
1