rd_get_news_story | R Documentation |
This function retrieves a full news story identified by its story ID via a Refinitiv JSON connection. In the RDP response the story text may be found in different places:
rd_get_news_story(
RDObject = RefinitivJsonConnect(),
story_id = NULL,
raw_output = FALSE,
debug = FALSE,
renderHTML = FALSE
)
RDObject |
A connection object returned by |
story_id |
Vector of story IDs. |
raw_output |
If |
debug |
If |
renderHTML |
If |
- If the response comes from the legacy UDF service, the story is expected in the
story$storyHtml
element.
- If the response comes from the RDP service, the content will be located under
newsItem$contentSet
. In that case, the function first checks for HTML content
in newsItem$contentSet$inlineXML
(if available) and, if not, in
newsItem$contentSet$inlineData
.
If renderHTML
is TRUE, any plain URLs in the resulting HTML will be converted
to clickable links via a helper function make_links_clickable()
(which you should
define elsewhere in your package), and the combined HTML is opened in the viewer.
If raw_output = FALSE
(the default), a character vector of the story HTML
(or a single combined HTML string if renderHTML = TRUE
). Otherwise, the raw list
of responses.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.