Skip to content
gregorleban edited this page Sep 8, 2015 · 21 revisions

Whenever you will be making a request to Event Registry, you will be getting back a JSON object containing information about articles, events, concepts, categories and/or other types of data. Event Registry can return you various properties for each of this type. To reduce the size of the responses, only some of the properties are sent by default. In cases when you want to get more/less properties, you can modify the ReturnInfo instance that is specified in most of the requests.

ReturnInfo is just a wrapper for individual data types and the properties that should be returned for them. ReturnInfo constructor accepts the following arguments:

ReturnInfo(
    articleInfo = ArticleInfoFlags(),             # details about the articles to return
    eventInfo = EventInfoFlags(),                 # details about the events to return
    sourceInfo = SourceInfoFlags(),               # details about the news sources to return
    categoryInfo = CategoryInfoFlags(),           # details about the categories to return
    conceptInfo = ConceptInfoFlags(),             # details about the concepts to return
    locationInfo = LocationInfoFlags(),           # details about the locations to return
    storyInfo = StoryInfoFlags(),                 # details about the stories to return
    conceptClassInfo = ConceptInfoFlags(),        # details about the concept classes to return 
    conceptFolderInfo = ConceptFolderInfoFlags()) # details about the concept folders to return

For each of the types, the default flags are set to return the most common set of parameters. In most cases you will not need to modify them. Also note, that not all specified types are relevant for all requests. For example, if you are requesting a stream of new articles, then parameters about events (eventInfo) will be ignored since nowhere in your output you will get any event.

Clone this wiki locally