eventregistry - v11.0.0
    Preparing search index...

    Class QueryEventArticlesIter

    QueryEventArticlesIter Class for iterating through all the articles in the event via callbacks

    Hierarchy (View Summary)

    Implements

    • AsyncIterable<Data.Article>
    Index
    internalPath: string = ""

    Set it to a default path.

    params: Record<string, unknown> = {}
    resultTypeList: RequestEvent[] = []
    • get path(): string

      Returns string

    • set path(path: string): void

      Parameters

      • path: string

      Returns void

    • Async Iterator function that returns the next item in the list of articles

      Returns AsyncIterator<Article>

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

      Parameters

      • key: string
      • val: unknown

      Returns void

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

      Parameters

      • key: string

      Returns void

    • Execute query and fetch batches of articles of the specified size (articleBatchSize)

      Parameters

      • callback: (item: Article) => void

        callback function that'll be called every time we get a new batch of articles from the backend

      • OptionaldoneCallback: (error?: string) => void

        callback function that'll be called when everything is complete

      Returns void

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

      Parameters

      • key: string

      Returns boolean

    • 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 the single result type that you would like to be returned. Any previously set result types will be overwritten. Result types can be the classes that extend RequestEvent base class (see classes below).

      Parameters

      • requestEvent: RequestEvent

      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