UNPKG

@botonic/plugin-contentful

Version:

Botonic Plugin Contentful is one of the **[available](https://github.com/hubtype/botonic/tree/master/packages)** plugins for Botonic. **[Contentful](http://www.contentful.com)** is a CMS (Content Management System) which manages contents of a great variet

20 lines (19 loc) 1.07 kB
import * as contentful from 'contentful'; import { ContentType } from 'contentful'; import memoize from 'memoizee'; import { ClientApiErrorReporter, GetEntriesType, GetEntryType, ReducedClientApi } from './client-api'; export declare class CachedClientApi implements ReducedClientApi { readonly client: ReducedClientApi; readonly cacheTtlMs: number; readonly errorReport: ClientApiErrorReporter; static readonly NO_EXPIRATION = -1; readonly getAsset: (id: string, query?: any) => Promise<contentful.Asset>; readonly getAssets: (query?: any) => Promise<contentful.AssetCollection>; readonly getEntries: GetEntriesType; readonly getEntry: GetEntryType; readonly getContentType: (id: string) => Promise<ContentType>; constructor(client: ReducedClientApi, cacheTtlMs: number, errorReport: ClientApiErrorReporter); memoize<Args extends any[], Return, F extends (...args: Args) => Promise<Return>>(func: F, functionLength: number): F; options(length: number): memoize.Options<any>; static normalizer(...args: any): string; }