Using the SDK
The Stae SDK is a wrapper around the API. This makes it quicker to develop projects and allow you to incorporate the Stae API in your applications since you don’t need to copy URLs out of anything to use the SDK.
Install the Stae node.js module
npm install stae --save
The easiest way to install the library is using npm, which is a package manager for node.js. Open the terminal on your machine that already has Node and npm installed, and run the above command in a new directory.
Throughout the SDK tutorials, we'll refer to RunKit notebooks to show how the SDK works. If you don't have a project to incorporate Stae but want to see how it works, check out the RunKit examples.
Create a basic readable API client, using your Stae account key.
Get a list of places available
RunKit Example: Find all places in Stae
Get data for a place by its data type
RunKit Example: Find Artworks in Detroit
Get a specific 911 call for a place
RunKit Example: Get a 911 call in San Francisco by its ID
Get traffic jams for New York, then filter/order the results
RunKit Example: NYC Traffic Jams filtered/sorted
Create a 311 issue for a source
RunKit Example: Write 311 Issues