UNPKG

@spree/storefront-api-v2-sdk

Version:

Node module to easily integrate your JavaScript or TypeScript application with Spree API V2. You can create an entirely custom Storefront in JS/TS with this package including one page checkout, Single Page Apps, PWAs and so on

15 lines (12 loc) 559 B
import Http from '../Http' import { IQuery } from '../interfaces/Query' import { ITaxonResult, ITaxonsResult } from '../interfaces/Taxon' import { Routes } from '../routes' export default class Taxons extends Http { public async list(params: IQuery = {}): Promise<ITaxonsResult> { return await this.spreeResponse('get', Routes.taxonsPath(), {}, params) as ITaxonsResult } public async show(id: string, params: IQuery = {}): Promise<ITaxonResult> { return await this.spreeResponse('get', Routes.taxonPath(id), {}, params) as ITaxonResult } }