@rr0/cms
Version:
RR0 Content Management System (CMS)
20 lines (19 loc) • 758 B
TypeScript
import { Elevation, Place, PlaceLocation } from "@rr0/place";
export declare abstract class PlaceService {
readonly rootDir: string;
protected readonly cache: Map<string, Place>;
protected readonly regex: RegExp;
protected constructor(rootDir: string);
read(fileName: string): Promise<Place>;
get(address: string): Promise<Place | undefined>;
getFileName(location: PlaceLocation): string;
protected abstract geocode(address: string): Promise<{
location: PlaceLocation;
data: any;
} | undefined>;
protected key(location: PlaceLocation): string;
protected abstract getElevation(location: PlaceLocation): Promise<Elevation | undefined>;
private cachePlace;
private create;
private save;
}