shopify-asset-api-manager

1.0.2 • Public • Published

Shopify Asset API Manager

A package for making requests to the Shopify Asset API to manage assets in a theme.

Installation

npm install shopify-asset-api-manager

Usage

import AssetAPIRequest from 'shopify-asset-api-manager';

const request = new AssetAPIRequest(
  'example_asset_key',
  'example_asset_value',
  'example_store',
  '2022-01',
  '12345',
  'abcdefghijklmnopqrstuvwxyz'
);
request.makeRequest();

API

AssetAPIRequest

constructor(assetKey: string, assetValue: string, storeName: string, apiVersion: string, themeID: string, accessToken: string)

Creates a new AssetAPIRequest instance.

Parameters

  • assetKey: The key of the asset to be updated.
  • assetValue: The new value for the asset.
  • storeName: The name of the Shopify store.
  • apiVersion: The version of the Shopify API to use.
  • themeID: The ID of the theme to update.
  • accessToken: The access token for authenticating the request.
makeRequest(): void

Makes a request to the Shopify Asset API to update the asset.

Contributing

If you find a bug or have an idea for a new feature, please open an issue or pull request on the GitHub repository.

License

The shopify-asset-api-manager is released under the MIT License.

Package Sidebar

Install

npm i shopify-asset-api-manager

Weekly Downloads

4

Version

1.0.2

License

MIT

Unpacked Size

5.96 kB

Total Files

7

Last publish

Collaborators

  • vorniches