Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 891 Bytes

readme.md

File metadata and controls

34 lines (24 loc) · 891 Bytes

🌏 Shopify Planet API (TypeScript)

This is a TypeScript wrapper around Shopify Planet API which enables to get neccessary information about brands which use Shopify Planet App. Currently, it only supports Server side (not Browsers).

This library may have breaking changes in the future.

Usage

  1. Install library
yarn add shopify-planet-api
  1. Create API client
import {ShopifyPlanetApi} from 'shopify-planet-api';

const planetApi = new ShopifyPlanetApi({
  // For credentials, please contact Shopify Planet Team
  clientId,
  token,
});
  1. Make first API call
const {shop} = await this.shopify.planetApi.getShopInfo({
  shopifyDomain: 'some-store.myshopify.com',
});
console.log(shop); // -> { allShipmentsCarbonNeutral: true }