Options
All
  • Public
  • Public/Protected
  • All
Menu

An interface describing a data store instance that contains the formatted formatted internal location data, and allows querying it.

Hierarchy

  • DataStore

Implemented by

Index

Methods

clearData

  • clearData(): Promise<void>

getCountiesData

  • getCountiesData(countryOrRegion: string, provinceOrState: string): Promise<InternalLocationData[]>

getLocationCount

  • getLocationCount(): Promise<number>

getLocationData

getLocationsList

  • getLocationsList(): Promise<string[]>

getSavedAt

  • getSavedAt(): Promise<Date | undefined>
  • Returns a clone of the date that a location data was last saved in the store.

    throws

    DataStoreNotInitializedError Thrown when the data store instance has not been initialized.

    Returns Promise<Date | undefined>

    undefined if nothing has been saved in the store yet.

getSourceLastUpdatedAt

  • getSourceLastUpdatedAt(): Promise<Date | undefined>

getStatesData

init

  • init(): Promise<void>

putLocationData

setSourceLastUpdatedAt

  • setSourceLastUpdatedAt(sourceLastUpdatedAt: Date | undefined): Promise<void>
  • Saves the date that the data source was last updated.

    throws

    DataStoreNotInitializedError Thrown when the data store instance has not been initialized.

    Parameters

    • sourceLastUpdatedAt: Date | undefined

      The date that the data source was last updated, e.g. the last commit date for the folder containing the JHU CSSE data in its GitHub repository.

    Returns Promise<void>

Generated using TypeDoc