News.Story.Definition
Summary
This method is responsible for retrieving News.Story data.
Methods
Definition(storyId: string)
Allows you to create a short definition for the News Story content object
Parameters:
Name | Is Optional | Default Value | Type | Description |
---|---|---|---|---|
storyId | No | - | string | Single story id |
Returned value: a Definition object
Definition(params: News.Story.Params)
Allows you to create a full definition for the News Story content object
News.Story.Params properties:
Property | Is Optional | Default Value | Type | Description |
---|---|---|---|---|
storyId | No | - | string | Full story id |
extendedParams | Yes | - | {[key: string]: any} | Specifies the parameters that will be merged with the request |
Returned value: a Definition object
getData(session: Session)
Sends a request to the data platform to retrieve conversion results described by the Definition object.
Parameter:
Name | Is Optional | Default Value | Type | Description |
---|---|---|---|---|
session | No | - | Session | Session instance |
Returned value: a ContentResponse
Example of usage:
(async () => {
const definition = News.Story.Definition('urn:newsml:reuters.com:20190926:nNRA9sv8uz:1');
const newsStory = await definition.getData(session);
})()