UNPKG

inventora-shopify-admin-api

Version:

Shopify Admin API is a NodeJS library built to help developers easily authenticate and make calls against the Shopify API. It was inspired by and borrows heavily from ShopifySharp.

29 lines (25 loc) 967 B
import * as Options from '../options'; import { BaseService } from '../infrastructure'; import { Shop } from '../interfaces'; /** * A service for manipulating Shopify shops. */ export class Shops extends BaseService { constructor(shopDomain: string, accessToken: string) { super(shopDomain, accessToken, ""); } /** * Returns shop data for the shop. * @param options Options for filtering the result. */ public get(options?: Options.FieldOptions) { return this.createRequest<Shop>("GET", "shop.json", "shop", options); } /** * Forces the shop to uninstall your Shopify app. Uninstalling an application is an irreversible operation. Be entirely sure that you no longer need to make API calls for the shop in which the application has been installed. */ public forceUninstallApp() { return this.createRequest<void>("DELETE", "api_permissions/current.json"); } } export default Shops;