npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@doocacommerce/anymarket-sdk

v1.0.0-beta.6

Published

SDK for Requests of Anymarket HUB

Downloads

40

Readme

SDK for Anymarket HUB

npm version npm downloads install size license

Documentation http://developers.anymarket.com.br/tools.html

Usage

$ sudo yarn add @doocacommerce/anymarket-sdk

or

$ sudo npm i @doocacommerce/anymarket-sdk
const anymartket = require('anymarket-sdk');

anymarket.configure({
	mode: 'sandbox',
	gumgaToken: '{gumgaToken}',
});

Sample

const anymartket = require('anymarket-sdk');

try {
	const params = {}; // optional params
	const getData = await anymarket.brands.get(params);
	console.log('getData', getData);
} catch (err) {
	console.log(err.toString());
}

Or getFirst sample

const { brands } = require('anymarket-sdk');

try {
	const id = 123;
	const getData = await brands.getFirst(id);
	console.log('getData', getData);
} catch (err) {
	console.log(err.toString());
}

Development

Available methods of SDK request:

Brands

const { brands } = require('anymarket-sdk');

brands.create({ Object });
brands.get({ Object }); // params { limit:5, offset: 5 }
brands.getFirst(123);
brands.update(id, { Object });
brands.delete(123); // or { id: 123 }

Categories

const { categories } = require('anymarket-sdk');

categories.create({ Object });
categories.get({ Object }); // params { limit:5, offset: 5 }
categories.getFirst(123);
categories.getFullPath({ Object }); // get category tree { limit: 5, offset: 5 }
categories.update(id, { Object });
categories.delete(123); // or { id: 123 }

Products

const { products } = require('anymarket-sdk');

products.create({ Object });
products.get({ Object }); // params { limit:5, offset: 5 }
products.getFirst(123);
products.update(id, { Object });

Variations

const { variations } = require('anymarket-sdk');

variations.create({ Object });
variations.get({ Object }); // params { limit:5, offset: 5 }
variations.getFirst(123);
variations.update(id, { Object });
variations.delete(123); // or { id: 123 } - (productId as id)

Variations Values

const { variationsValues } = require('anymarket-sdk');
const variationId = 123;

variationsValues.create(variationId, { Object });
variationsValues.get({ Object }); // params { id: 123, limit:5, offset: 5 } - *required id of variation
variationsValues.getFirst(123); // get all values of variation group
variationsValues.update({ id: productId, valueId: skuId }, { Object });
variationsValues.delete({ id: productId, valueId: skuId });

SKUS

const { skus } = require('anymarket-sdk');
const productId = 123;

skus.create(productId, { Object });
skus.get({ Object }); // params { id: productId, limit:5, offset: 5 } *required id of product
skus.getFirst(productId); // get all skus of product
skus.update({ id: productId, skuId: skuId }, { Object });

Images

const { images } = require('anymarket-sdk');
const productId = 123;

images.create(productId, { Object });
images.get({ Object }); // params { limit:5, offset: 5 }
images.getFirst(productId); // get all images of product
images.delete({ id: productId, imageId: imageId });

Stocks

const { stocks } = require('anymarket-sdk');

stocks.update({Object}[]); // array of objects

Orders

const { orders } = require('anymarket-sdk');

orders.get();
orders.create({ Object });
orders.update(123, { Object });
orders.updateNfe(123, { Object });

Orders Feed

const { ordersFeed } = require('anymarket-sdk');

ordersFeed.get();
ordersFeed.update(123, { Object });