Npr Listening
NPR Listening is an API for working with NPR listening experiences such as audio playback, listening history, or listening-related interactions.
- Base URL:
https://listening.api.npr.org - Auth: OAuth 2.0 (user-delegated) — attach an InTouch
oauthcredential. Mint one withitcli.py /oauth <provider>(device-code) or/google-auth(Google); the server auto-refreshes the access token before each run, so the connector never handles or stores tokens.
Operations
getaggrecommendations— GET /v2/aggregation/{aggId}/recommendations — Get a set of recommendations for an aggregation independent of the user's listening historygetchannels— GET /v2/channels — Get the list of available channelsgethistory— GET /v2/history — Get recent ratings the logged-in user has submittedgetorganizationcategory— GET /v2/organizations/{orgId}/categories/{category}/recommendations — Get a list of recommendations from a category of content from an organizationgetorganizationoverview— GET /v2/organizations/{orgId}/recommendations — Get a variety of details about an organization including various lists of recent audio itemsgetpromo— GET /v2/promo/recommendations — Retrieve the most recent promo audio heard by the logged-in user
Inputs
- a linked
oauthcredential (no key inputs) — the server injects a freshAuthorization: Bearerfrom it operation— one of the operations above- path parameters when an operation's path contains
{...} query— optional JSON object of query paramsbody— JSON object for create/update ops
Example
operation: getaggrecommendations
# (attach an 'oauth' credential to the task — no inline secrets)
Publishes
The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.
erroroperationresultstatus
Input Properties
Every property this tool accepts, from its own tool.iml.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
operation |
string | yes | — | One of: getaggrecommendations, getchannels, gethistory, getorganizationcategory, getorganizationoverview, getpromo |
aggId |
string | no | — | Path parameter aggId (required by some operations). |
category |
string | no | — | Path parameter category (required by some operations). |
orgId |
string | no | — | Path parameter orgId (required by some operations). |
query |
string | no | — | Optional query params as a JSON object string, e.g. {"limit": 10}. |