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.
rozek
InvocationTracker_Test
HTTP
Here are some tests for val InvocationTracker Test Cases Constructor test with valid inputs tests creating a new InvocationTracker instance with valid name and granularity Constructor test with invalid name verifies that creating an InvocationTracker with an invalid name throws an error Constructor test existing table verifies that creating an InvocationTracker with an already existing table does not modify that table Granularity method test checks if the Granularity() method returns the correct initial granularity value setGranularity method test tests setting a new granularity value and verifies it's updated correctly increment method test verifies that the increment() method correctly increases the invocation count InvocationsInSpan method test tests retrieving invocations within a specific time span, including multiple time periods totalInvocationsInSpan method test checks if the total number of invocations within a given time span is calculated correctly reset method test verifies that the reset() method clears all recorded invocations
0
jxnblk
avatar
HTTP
Jxnblk's SVG avatar React import { Avatar } from "https://esm.town/v/jxnblk/avatar"; Props <Avatar
size={96}
color="tomato"
reverse={true}
/> SVG import { svg } from "https://esm.town/v/jxnblk/avatar"; img <img src="https://jxnblk-avatar.web.val.run" alt="Jxnblk" /> img params https://jxnblk-avatar.web.val.run?size=96&color=tomato&reverse=true md 
1

stevekrouse
populateTwitterDB
Script
Poll Twitter & Populate SQlite database The twitter API (or in this case someone else's wrapper over the twitter API) is finicky, so we just try to get one handle per minute, and shove whatever we get into our database, which could be an error message (this is why handles don't have a unique index).
0