eventregistry - v11.0.0
    Preparing search index...

    Class TopicPage

    Hierarchy

    • QueryParamsBase
      • TopicPage
    Index
    params: Record<string, unknown> = {}
    • set articleHasDuplicateFilter(
          value: "keepAll" | "skipHasDuplicates" | "keepOnlyHasDuplicates",
      ): void

      Some articles are later copied by others. What should be done with such articles. Possible values are: "skipHasDuplicates" (skip the articles that have been later copied by others), "keepOnlyHasDuplicates" (return only the articles that have been later copied by others) and "keepAll" (no filtering, default)

      Parameters

      • value: "keepAll" | "skipHasDuplicates" | "keepOnlyHasDuplicates"

      Returns void

    • set articleHasEventFilter(
          value:
              | "keepAll"
              | "skipArticlesWithoutEvent"
              | "keepOnlyArticlesWithoutEvent",
      ): void

      Some articles describe a known event and some don't. This filter allows you to filter the resulting articles based on this criteria. Possible values are: "skipArticlesWithoutEvent" (skip articles that are not describing any known event in ER), "keepOnlyArticlesWithoutEvent" (return only the articles that are not describing any known event in ER) and "keepAll" (no filtering, default)

      Parameters

      • value: "keepAll" | "skipArticlesWithoutEvent" | "keepOnlyArticlesWithoutEvent"

      Returns void

    • set articleIsDuplicateFilter(
          value: "keepAll" | "skipDuplicates" | "keepOnlyDuplicates",
      ): void

      Some articles can be duplicates of other articles. What should be done with them. Possible values are: "skipDuplicates" (skip the resulting articles that are duplicates of other articles), "keepOnlyDuplicates" (return only the duplicate articles) and "keepAll" (no filtering, default)

      Parameters

      • value: "keepAll" | "skipDuplicates" | "keepOnlyDuplicates"

      Returns void

    • set articleThreshold(value: number): void

      What is the minimum total weight that an article has to have in order to get it among the results?

      Parameters

      • value: number

      Returns void

    • set dataTypes(dataTypes: DataType | DataType[]): void

      What data types should we search? "news" (news content, default), "pr" (press releases), or "blog". If you want to use multiple data types, put them in an array (e.g. ["news", "pr"])

      Parameters

      Returns void

    • set eventThreshold(value: number): void

      What is the minimum total weight that an event has to have in order to get it among the results?

      Parameters

      • value: number

      Returns void

    • set languages(languages: string | string[]): void

      Restrict the results to the list of specified languages

      Parameters

      • languages: string | string[]

      Returns void

    • set maxDaysBack(maxDaysBack: number): void

      What is the maximum allowed age of the results?

      Parameters

      • maxDaysBack: number

      Returns void

    • set restrictToSetCategories(restrict: boolean): void

      if set to true then return only results that are assigned to one of the specified categories

      Parameters

      • restrict: boolean

      Returns void

    • set restrictToSetConceptsAndKeywords(restrict: boolean): void

      if true then the results have to mention at least one of the specified concepts or keywords

      Parameters

      • restrict: boolean

      Returns void

    • set restrictToSetLocations(restrict: boolean): void

      if set to true, then return only results that are located at one of the specified locations

      Parameters

      • restrict: boolean

      Returns void

    • set restrictToSetSources(restrict: boolean): void

      if set to true then return only results from one of the specified news sources this includes also sources set by source groups or by source locations

      Parameters

      • restrict: boolean

      Returns void

    • set sourceRankEndPercentile(endPercentile: number): void

      Parameters

      • endPercentile: number

      Returns void

    • set sourceRankStartPercentile(startPercentile: number): void

      Parameters

      • startPercentile: number

      Returns void

    • Add a value to an array of values for a property.

      Parameters

      • key: string
      • val: unknown

      Returns void

    • Add relevant location to the topic page

      Parameters

      • locationUri: string

        uri of the location to add

      • weight: number

        importance of the provided location (typically in range 1 - 50)

      Returns void

    • Remove the value of a property key (if existing).

      Parameters

      • key: string

      Returns void

    • Return a list of articles that match the topic page

      Parameters

      • args: TopicPageArticles = {}

        {ER.TopicPageArticles} Object which contains a host of optional parameters

      Returns Promise<{}>

    • Return a list of events that match the topic page

      Parameters

      • args: TopicPageEvents = {}

        {ER.TopicPageEvents} Object which contains a host of optional parameters

      Returns Promise<{}>

    • Return the parameters.

      Returns Record<string, unknown>

    • Do we have in the query property named 'key'?

      Parameters

      • key: string

      Returns boolean

    • Load the topic page definition from an object

      Parameters

      • definition: object

        topic page definition

      Returns void

    • Load an existing topic page from Event Registry based on the topic page URI

      Parameters

      • uri: string

        uri of the topic page saved in your Event Registry account

      Returns Promise<ER.TopicPage>

    • Load topic page from an existing file

      Parameters

      • filepath: string

        file that contains the topic page definition

      Returns void

    • Save the topic page definition to a file

      Parameters

      • filepath: string

        location of the file to which you'll save the topic page definition

      Returns void

    • Set a property value that represents date. Value can be string in YYYY-MM-DD format or a Date object.

      Parameters

      • propName: string
      • val: string | Date

      Returns void

    • Parse the value "value" and use it to set the property propName and the operator with name propOperName

      Parameters

      • value: string | QueryItems | unknown[] | undefined

        String, QueryItems or an array.

      • propName: string

        Values to be set using property name propName.

      • propOperName: string | undefined

        Property to set containing the "and" or "or". Relevant only if multiple items are provided in "value". Can be None if only one value is possible.

      • defaultOperName: string

        Which operator should be used in case "value" is an array. If an array, we will print also a warning to suggest use of QueryItems.

      Returns void

    • Set a value of a property in the query.

      Parameters

      • key: string
      • value: unknown

      Returns void

    • Set value in query params if the 'val' is different from 'defVal'.

      Parameters

      • propName: string
      • val: unknown
      • defVal: unknown

      Returns void

    • Encode datetime into UTC ISO format which can be sent to ER.

      Parameters

      • val: string | Date
      • Optionalformat: string

      Returns string