get_story returns a list of stories based on a multifaceted query. One
story represents one online publication. Each story refers to a single URL
from any feed within a single media source.
get_story_list(last_process_stories_id = 0L, rows = 100,
feeds_id = NULL, q = NULL, fq = NULL,
sort = "processed_stories_id", wc = FALSE, show_feeds = FALSE,
api_key = Sys.getenv("MEDIACLOUD_API_KEY"))Return stories in which the processed_stories_id is greater than this value.
Number of stories to return, max 1000.
Return only stories that match the given feeds_id, sorted my descending publish date
If specified, return only results that match the given Solr query. Only one q parameter may be included.
If specified, file results by the given Solr query. More than one fq parameter may be included.
Returned results sort order. Supported values: processed_stories_id, random
If set to TRUE, include a 'word_count' field with each story that includes a count of the most common words in the story
If set to TRUE, include a 'feeds' field with a list of the feeds associated with this story
Character string with the API key you get from mediacloud.org. Passing it is compulsory. Alternatively, function can be provided from the global environment.
Data frame with results. See https://github.com/berkmancenter/mediacloud/blob/master/doc/api_2_0_spec/api_2_0_spec.md#stories for field descriptions.
# NOT RUN {
stories <- get_story_list()
stories <- get_story_list(q = "Trump")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab