import BaseService from "../../service"; import { IService, IResourceMapper, IFindParams } from "../../interfaces"; import BookmarkPopularity, { IBookmarkPopularity, IBookmarkPopularityResource } from "../bookmarkPopularity"; export interface IBookmarkPopularityService extends IService { findByPlaceId(placeId: string, options: IFindParams): Promise; findByTargetType(targetType: string, options: IFindParams): Promise; } export default class BookmarkPopularityService extends BaseService implements IBookmarkPopularityService { resource: string; mapper: IResourceMapper; /** * @example http://stable.web.op-api-gateway.qa.lonelyplanet.com/bookmark-lists/popularity */ url(): string; /** * Find bookmarked resources' popularity by place id. * * @param placeId Place Id * @param options * @example * * ```typescript * * client.bookmarkListPopularity.findByPlaceId("1341151"}); * ``` */ findByPlaceId(placeId: string, options?: IFindParams): Promise; /** * Find bookmarked resources' popularity by their type. * * @param targetType the type of the bookmarked resource * @param options * @example * * ```typescript * * client.bookmarkListPopularity.findByTargetType("poi"}); * ``` */ findByTargetType(targetType: string, options?: IFindParams): Promise; private fetch(options); }