eventregistry - v11.0.0
    Preparing search index...

    Class EventRegistry

    Index
    analytics: AnalyticsFluent

    Ergonomic text analytics façade — see AnalyticsFluent.

    articles: ArticlesFluent

    Ergonomic article search/iterate/get façade — see ArticlesFluent.

    authors: { uri: (label: string) => Promise<string> }

    Ergonomic author uri resolution — see helpers/uri.authorUri.

    categories: { uri: (label: string) => Promise<string> }

    Ergonomic category uri resolution — see helpers/uri.categoryUri.

    conceptClasses: { uri: (label: string, lang?: string) => Promise<string> }

    Ergonomic concept class uri resolution — see helpers/uri.conceptClassUri.

    concepts: {
        uri: (label: string, args?: GetConceptUriArguments) => Promise<string>;
    }

    Ergonomic concept uri resolution — see helpers/uri.conceptUri.

    counts: CountsFluent

    Ergonomic concept/category mention-count façade — see CountsFluent.

    eventForText: EventForTextFluent

    Ergonomic callable form of GetEventForText.compute().

    events: EventsFluent

    Ergonomic event search/iterate/get façade — see EventsFluent.

    eventTypes: { uri: (label: string) => Promise<string> }

    Ergonomic event type uri resolution — see helpers/uri.eventTypeUri.

    Ergonomic source/concept/category info façade — see InfoFluent.

    locations: {
        uri: (label: string, args?: GetLocationUriArguments) => Promise<string>;
    }

    Ergonomic location uri resolution — see helpers/uri.locationUri.

    logger: Logger
    mentions: MentionsFluent

    Ergonomic mentions search/iterate façade — see MentionsFluent.

    recent: RecentFluent

    Ergonomic recent activity façade — see RecentFluent.

    shares: SharesFluent

    Ergonomic top-shared articles/events façade — see SharesFluent.

    sources: {
        groupUri: (label: string) => Promise<string>;
        uri: (label: string, dataType?: DataType | DataType[]) => Promise<string>;
    }

    Ergonomic news source/source group uri resolution — see helpers/uri.sourceUri.

    stories: StoriesFluent

    Ergonomic story lookup façade — see StoriesFluent.

    topicPages: TopicPagesFluent

    Ergonomic topic page listing/loading/building façade — see TopicPagesFluent.

    trends: TrendsFluent

    Ergonomic trending concepts/categories façade — see TrendsFluent.

    usage: Usage

    Token and request accounting plus the optional maxTokens budget guard.

    • Check the latest Node.js SDK version and log if this client is outdated. Prefers /static/nodejsSDKVersion.txt on the API host; if that file is missing (or the request fails), falls back to the npm registry latest document.

      Returns Promise<void>

    • Main method for executing the search queries.

      Type Parameters

      Parameters

      • query: { getQueryParams: () => Record<string, unknown>; path: string }

        instance of Query class

      • allowUseOfArchive: boolean = ...
      • Optionaloptions: RequestOptions

        signal / timeoutMs for this call only

      Returns Promise<ER.Response<T, string>>

    • If you have article urls and you want to query them in ER you first have to obtain their uris in the ER.

      Parameters

      • articleUrls: string | string[]

        a single article url or a list of article urls

      Returns Promise<Record<string, unknown>>

    • return author uri that is the best match for the given author name (and potentially source url) if there are multiple matches for the given author name, they are sorted based on the number of articles they have written (from most to least frequent)

      Parameters

      • authorName: string

      Returns Promise<string | undefined>

    • Return a category uri that is the best match for the given label

      Parameters

      • categoryLabel: string

        partial or full name of the category for which to return category uri

      Returns Promise<string | undefined>

    • Return a uri of the concept class that is the best match for the given label

      Parameters

      • classLabel: string

        partial or full name of the concept class for which to return class uri

      • lang: string = "eng"

        language in which the class label is specified

      Returns Promise<string | undefined>

    • Return detailed information about a particular concept

      Parameters

      • conceptUri: string

        uri of the concept

      • OptionalreturnInfo: ReturnInfo

        what details about the concept should be included in the returned information

      Returns Promise<unknown>

    • return a concept uri that is the best match for the given concept label if there are multiple matches for the given conceptLabel, they are sorted based on their frequency of occurrence in news (most to least frequent)

      Parameters

      • conceptLabel: string

        partial or full name of the concept for which to return the concept uri

      • args: GetConceptUriArguments = {}

        Object which contains a host of optional parameters

      Returns Promise<string | undefined>

    • get the total number of requests that the user can make in a day. Information is only accessible after you make some query.

      Returns number

    • Return an event type uri that is the best match for the given label

      Parameters

      • eventTypeLabel: string

        partial or full name of the event type for which to return the uri

      Returns Promise<string | undefined>

    • Get a value of the header headerName that was set in the headers in the last response object

      Parameters

      • headerName: string
      • OptionaldfltVal: string

      Returns string | undefined

    • Return the headers returned in the response object of the last executed request

      Returns Headers

    • return true or false depending on whether the last request used the archive or not

      Returns boolean

    • Return a location uri that is the best match for the given location label

      Parameters

      • locationLabel: string

        partial or full location name for which to return the location uri

      • args: GetLocationUriArguments = {}

        Object which contains a host of optional parameters

      Returns Promise<string | undefined>

    • Minimum delay between requests in seconds (constructor units).

      Returns number

    • Return the news source that best matches the source name

      Parameters

      • sourceName: string

        partial or full name of the source or source uri for which to return source uri

      • dataType: DataType | DataType[] = ...

      Returns Promise<string | undefined>

    • get the number of requests that are still available for the user today. Information is only accessible after you make some query.

      Returns number

    • Tokens still available on the account (availableTokens - usedTokens from the usage endpoint). Makes one request; it is exempt from the maxTokens guard.

      Parameters

      Returns Promise<number>

    • Return a list of SASB uris. Note: SASB uris can only be used when querying mentions (QueryMentions, QueryMentionsIter)

      Returns Promise<unknown>

    • Return a list of SDG uris. Note: SDGs can only be used when querying mentions (QueryMentions, QueryMentionsIter)

      Returns Promise<unknown>

    • Return info about the source group

      Parameters

      • sourceGroupUri: string

      Returns Promise<unknown>

    • Return the list of source groups

      Returns Promise<unknown>

    • Return the URI of the source group that best matches the name

      Parameters

      • sourceGroupName: string

        partial or full name of the source group

      Returns Promise<string | undefined>

    • alternative (shorter) name for the method getNewsSourceUri()

      Parameters

      Returns Promise<string | undefined>

    • Make a request for json data

      Type Parameters

      • T = unknown

      Parameters

      • path: string

        url on er (e.g. "/api/v1/article")

      • Optionalparameters: Record<string, unknown>

        Optional parameters to be included in the request

      • allowUseOfArchive: boolean = ...
      • Optionaloptions: RequestOptions

      Returns Promise<ErHttpResponse<T>>

    • Type Parameters

      • T = unknown

      Parameters

      • path: string
      • Optionalparameters: Record<string, unknown>
      • Optionalheaders: Record<string, unknown>
      • Optionalcookies: Record<string, unknown>
      • Optionaloptions: RequestOptions

      Returns Promise<ErHttpResponse<T>>

    • print some statistics about the last executed request

      Returns void

    • Parameters

      • params: Record<string, unknown> | null

      Returns void

    • Should all requests be logged to a file or not?

      Parameters

      • logging: boolean

      Returns void

    • Return a list of dmoz categories that contain the prefix

      Parameters

      • prefix: string

        input text that should be contained in the category name

      • args: SuggestCategoriesArguments = {}

        Object which contains a host of optional parameters

      Returns Promise<UriSuggestion[]>

    • Return a list of concept classes that match the given prefix

      Parameters

      • prefix: string

        input text that should be contained in the category name

      • args: SuggestConceptClassesArguments = {}

        Object which contains a host of optional parameters

      Returns Promise<UriSuggestion[]>

    • Return a list of concepts that contain the given prefix. Returned matching concepts are sorted based on their frequency of occurrence in news (from most to least frequent)

      Parameters

      • prefix: string

        input text that should be contained in the concept

      • args: SuggestConceptsArguments = {}

        Object which contains a host of optional parameters

      Returns Promise<UriSuggestion[]>

    • Return a list of event types that match the prefix

      Parameters

      Returns Promise<UriSuggestion[]>

    • Return a list of event types that match the prefix

      Parameters

      • prefix: string
      • Optionalpage: number
      • Optionalcount: number

      Returns Promise<UriSuggestion[]>

    • Return a list of industries that match the prefix. Note: Industries can only be used when querying mentions (QueryMentions, QueryMentionsIter)

      Parameters

      Returns Promise<unknown>

    • Return a list of industries that match the prefix. Note: Industries can only be used when querying mentions (QueryMentions, QueryMentionsIter)

      Parameters

      • prefix: string
      • Optionalpage: number
      • Optionalcount: number

      Returns Promise<unknown>

    • Return a list of geo locations (cities or places) that are close to the provided (lat, long) values

      Parameters

      • latitude: number

        latitude part of the coordinate

      • longitude: number

        longitude part of the coordinate

      • radiusKm: number

        radius in kilometers around the coordinates inside which the locations should be returned

      • args: SuggestLocationsAtCoordinateArguments = {}

        Object which contains a host of optional parameters

      Returns Promise<unknown>

    • Return a list of news sources that match the prefix

      Parameters

      • prefix: string

        input text that should be contained in the source name or uri

      • args: SuggestNewsSourcesArguments = {}

        Object which contains a host of optional parameters

      Returns Promise<UriSuggestion[]>

    • Return a list of news source groups that match the prefix

      Parameters

      • prefix: string

        input text that should be contained in the source group name or uri

      • args: SuggestSourceGroupsArguments = {}

        Object which contains a host of optional parameters

      Returns Promise<UriSuggestion[]>

    • Return a list of news sources that are close to the provided (lat, long) values

      Parameters

      • latitude: number

        latitude part of the coordinate

      • longitude: number

        longitude part of the coordinate

      • radiusKm: number

        radius in kilometers around the coordinates inside which the news sources should be located

      • countOrArgs: number | SuggestSourcesAtCoordinateArguments = 20

      Returns Promise<unknown>

    • Return a list of news sources that are close to the provided (lat, long) values

      Parameters

      • conceptUri: string

        concept that represents a geographic location for which we would like to obtain a list of sources located at the place

      • args: SuggestSourcesAtPlaceArguments = {}

        Object which contains a host of optional parameters

      Returns Promise<unknown>

    • Return a view of this client whose every call (classic, helpers, fluent namespaces and iterators) also observes options.signal and options.timeoutMs. State (rate limit, usage, headers, queue) is shared with this instance. A view's signal adds to, and its timeoutMs replaces, the inherited ones.

      Parameters

      Returns EventRegistry

    • Parameters

      • uriWgtList: string[]

      Returns string[]