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.
bao
notionSiteRss
HTTP
Generate an RSS feed for your Notion site. Prerequisite: the articles/posts needs to be in a Notion database. Create a Notion integration in http://notion.so/profile/integrations Go to the Notion database -> click ••• from top right -> Connections -> Connect to, select the integration from last step Fork this val Set up your NOTION_DATABASE_ID and NOTION_API_TOKEN in: https://www.val.town/settings/environment-variables Update the code to customize with your database properties (look out for "Customize based on your database") Share the RSS url
1
sammeltassen
allmaps
HTTP
Random Maps API This val returns one or more random rows from a SQLite database as a JSON array. Each item represents a digitised map from a collection and contains the following properties: {
// SQLite identifier
"id": 70607,
// Slug for the organisation
"organizationId": "lmec",
// Title of the map
"title": "A topographical map of the northn. part of New York Island, exhibiting the plan of Fort Washington, now Fort Knyphausen, with the rebels lines to the southward, which were forced by the troops under the command of the Rt. Honble. Earl Percy, on the 16th Novr. 1776, and survey'd immediately after by order of his Lordship",
// IIIF Presentation Manifest URL
"manifestId": "https://collections.leventhalmap.org/search/commonwealth:9s161881v/manifest",
// IIIF Image URL (first image in the manifest)
"imageId": "https://iiif.digitalcommonwealth.org/iiif/2/commonwealth:9s1618824"
} The val returns a single map by default. You can change this with the following parameters: count=100 Request a specific number of maps (max 1000) org=lmec Request maps from a specific institution For example: https://sammeltassen-allmaps.web.val.run/?count=100&org=lmec The val is used to offer maps to new users of Allmaps Editor . The scrapers used to gather the source data can be found here .
0
joey
BlobArray
Script
Blob Array Create an array as a Database, instantly! Just create a new val for your array: import { BlobArray } from "https://esm.town/v/joey/BlobArray";
type User = { email: string };
// specify the type inside the TS generic <> to define the type of your array
export let myUserArray = BlobArray<User>("my-user-array"); Now import it and start using it in your vals! import { myUserArray } from "https://esm.town/v/joey/myUserArray";
// overwrite the entire array
await myUserArray.set([{ email: "user1@gmail.com" }, { email: "user2@yahoo.com" }]);
// get all the entries in your array
const allUsers = await myUserArray.get();
// call any array method you want, just use "await"
await myUserArray.push({ email: "johndoe@gmail.com" });
const gmailUsers = await myUserArray.filter(u => u.email.includes("@gmail.com"));
0