Typedef
Static Public Summary | ||
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
Static Public
public CollectionDocJSON: Object source
Properties:
Name | Type | Attribute | Description |
version | string | The version of the Collection.Doc+JSON Hypermedia Type Specification being used by this document |
|
href | string | A unique identifier of the resource representation in the form of a Uniform Resource Identifier (URI) |
|
attributes | Object | A set of metadata attributes that represent the "state" of the resource in the form of key-value pairs; may be an empty object |
|
items | Array | A list of items associated with this document; may be an empty array |
|
links | Object | A map of resources that expose controls and communicate relationships with other documents; the keys describe the relationship to the current document, while the values are arrays of links |
|
errors | Array | A list of errors encountered in the process of creating and/or retrieving this document, intended to facilitate reliable debugging of client/server interactions |
public Config: Object source
Properties:
Name | Type | Attribute | Description |
apiBaseUrl | string |
|
DEPRECATED / NO LONGER IN USE: The NPR One API hostname and protocol, typically |
apiVersion | string |
|
DEPRECATED / NO LONGER IN USE: The NPR One API version, typically |
authProxyBaseUrl | string |
|
The full URL to your OAuth proxy, e.g. |
newDeviceCodePath | string |
|
The path to your proxy for starting a |
pollDeviceCodePath | string |
|
The path to your proxy for polling a |
refreshTokenPath | string |
|
The path to your proxy for the |
tempUserPath | string |
|
The path to your proxy for the |
logoutPath | string |
|
The path to your proxy for the |
accessToken | string |
|
The access token to use if not using the auth proxy |
clientId | string |
|
The NPR One API |
advertisingId | string |
|
The custom X-Advertising-ID header to send with most requests, not typically used by third-party clients |
advertisingTarget | string |
|
The custom X-Advertising-Target header to send with most requests, not typically used by third-party clients |
subdomain | string |
|
The custom subdomain to use for requests, not typically used by third-party clients |
public FormFactorLink: Link source
Properties:
Name | Type | Attribute | Description |
form-factor | string |
|
The form-factor for the most appropriate display of or interaction with the resource, usually irrelevant unless there is more than one link of the same type |
public ImageLink: FormFactorLink source
public RecommendationAttributes: Object source
Properties:
Name | Type | Attribute | Description |
type | string | The type of recommendation, usually |
|
uid | string | The universal identifier of the recommendation |
|
title | string | The title of the recommendation |
|
skippable | boolean | Whether or not the recommendation is skippable, usually true, but false for e.g. sponsorship |
|
slug | string |
|
A slug or category for the recommendation |
provider | string | The provider of the story, usually |
|
program | string |
|
The program as part of which this recommendation aired |
duration | number | The duration of the audio according to the API; note that the actual duration can differ |
|
date | string | ISO-8601 formatted date/time; the date at which the story was first published |
|
description | string |
|
A short description of the recommendation |
rationale | string | The reason for recommending this piece to the listener |
|
button | string |
|
The text to display in a clickable button on a feature card |
public StationAttributes: Object source
Properties:
Name | Type | Attribute | Description |
orgId | string | The system's unique ID for this station, used across NPR One Microservices and NPR's other APIs |
|
guid | string | The system's internal unique identifier for a station, not typically used by other APIs or consumers |
|
brand | StationBrandData | An associative array of brand-related metadata for this station |
|
eligibility | StationEligibilityData | An associative array of eligibility-related metadata for this station |
|
newscast | StationNewscastData |
|
Metadata about the newscast for this station; newscasts are handled internally by other microservices such as the NPR One Listening Service, so this data should typically not be used by consumers |
Metadata | StationNetwork | about the network, if this station is part of a network |
public StationBrandData: Object source
Properties:
Name | Type | Attribute | Description |
name | string | The display name for the station. In most cases, this will be the same as call letters combined with band. When returning networks, it will return the network name (e.g. Minnesota Public Radio). |
|
call | string | null | The three-to-four-letter identifying code for this station. Please use this with caution; most stations prefer to be identified by their name in client applications instead of call. |
|
frequency | string | null | Where on the radio dial the station can be heard. If the band is AM, the frequency will be between 540 and 1600. If the band is FM, the frequency will be between 87.8 and 108.0. |
|
band | string | null | The subsection of the radio spectrum -- 'AM' or 'FM' -- where this station can be heard |
|
tagline | string | A short text-logo for the station |
|
marketCity | string | The city that the station is most closely associated with. This may or may not be the city the station is licensed in and it may or may not be the city that the station or the station's antenna is located in. |
|
marketState | string | The state that the station is most closely associated with. This may or may not be the state the station is licensed in and it may or may not be the state that the station or the station's antenna is located in. |
public StationEligibilityData: Object source
Properties:
Name | Type | Attribute | Description |
nprOne | boolean | Whether or not this organization is considered an NPR One station |
|
musicOnly | boolean | Whether or not this station only plays music |
|
format | string | The format of the programming on this station |
|
status | string | The status of the station within NPR's system, not typically used by consumers |
public StationNetwork: Object source
Properties:
Name | Type | Attribute | Description |
currentOrgId | string | The current station being viewed. Client applications should generally ignore this field. |
|
usesInheritance | boolean | Whether or not the current station inherits from a parent organization, also referred to as a network |
|
inheritingFrom | string |
|
The system' unique ID for the organization that the current station is inheriting from, if inheritance is on |
name | string | The display name for the current organization |
|
tier1 | StationNetworkTierOne |
|
The top-level organization, if this station is part of a network |
public StationNetworkTierOne: Object source
Properties:
Name | Type | Attribute | Description |
id | string | The unique identifier of the top-level organization in the network |
|
usesInheritance | boolean | Whether or not this station inherits from a parent organization, also referred to as a network |
|
name | string | The display name for the top-level organization in the network |
|
status | string | The status of the top-level organization within NPR's system, not typically used by consumers |
|
tier2 | Array<StationNetworkTierTwo> |
|
One or more stations that are hierarchical children of this organization |
public StationNetworkTierThree: Object source
Properties:
Name | Type | Attribute | Description |
id | string | The unique identifier of a tier 3 organization in the network |
|
usesInheritance | boolean | Whether or not this station inherits from a parent organization, also referred to as a network |
|
name | string | The display name for a tier 3 organization in the network |
public StationNetworkTierTwo: Object source
Properties:
Name | Type | Attribute | Description |
id | string | The unique identifier of a tier 2 organization in the network |
|
usesInheritance | boolean | Whether or not this station inherits from a parent organization, also referred to as a network |
|
name | string | The display name for a tier 2 organization in the network |
|
tier3 | Array<StationNetworkTierThree> |
|
One or more stations that are hierarchical children of this organization |
public StationNewscastData: Object source
Properties:
Name | Type | Attribute | Description |
id | string | The ID of the newscast that should be played for this station; this is handled internally by other microservices such as the NPR One Listening Service, so this field should typically not be used by consumers |
|
recency | null | number | How often the newscast should be played, in minutes; a value of |
public UserAffiliation: Object source
Properties:
Name | Type | Attribute | Description |
id | number | A unique identifier for the aggregation (program) |
|
title | string |
|
The display name of the aggregation (program) |
href | string | A link that can be followed to get content from this aggregation (program) |
|
following | boolean | Whether or not the user is following the aggregation. When changing affiliation status, the client is expected to toggle this value and then send the entire object back. |
|
rating | number |
|
The user's average rating for this affiliation on a scale of 0-1. Absent if user never listened to the aggregation. |
daysSinceLastListen | number |
|
The number of days since a user last listened to a story from this aggregation. Absent if user never listened to the aggregation. |
public UserAttributes: Object source
Properties:
Name | Type | Attribute | Description |
id | string | Some unique identifier for the user |
|
string | The user's email address |
||
firstName | string | The user's first name |
|
lastName | string | The user's last name |
|
cohort | UserCohort | The user's cohort (an experimental grouping for User Experience A/B Testing) |
|
organizations | Array<UserOrganization> | User's chosen NPR Member Station(s) |
|
affiliations | Array<UserAffiliation> | Programs, shows, and podcasts that the user has positively interacted with |
public UserOrganization: Object source
Properties:
Name | Type | Attribute | Description |
id | string | Some unique identifier for the organization |
|
displayName | string | A short displayable text field for the end user, strictly text |
|
call | string | Station call letters |
|
city | string | A short description of the station's main market city |
|
logo | string |
|
Station logo image URL |
donationUrl | string |
|
The URL to a website where users may make a donation to support the station |