šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

swell-node

Package Overview
Dependencies
Maintainers
0
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swell-node

Swell API client for NodeJS

6.0.0
latest
Source
npm
Version published
Weekly downloads
593
Maintainers
0
Weekly downloads
Ā 
Created
Source

Swell API library for NodeJS

Swell is a customizable, API-first platform for powering modern B2C/B2B shopping experiences and marketplaces. Build and connect anything using your favorite technologies, and provide admins with an easy to use dashboard.

Install

npm install swell-node --save

Connect

const { swell } = require('swell-node');

swell.init('my-store', 'secret-key');

To connect to multiple stores in the same process, use swell.createClient():

const { swell } = require('swell-node');

const client1 = swell.createClient('my-store-1', 'secret-key-1');
const client2 = swell.createClient('my-store-2', 'secret-key-2');

Usage

try {
  const { data } = await swell.get('/products', {
    active: true
  });
  console.log(data);
} catch (err) {
  console.error(err.message);
}

Documentation

This library is intended for use with the Swell Backend API: https://developers.swell.is/backend-api

Contributing

Pull requests are welcome

License

MIT

Keywords

swell

FAQs

Package last updated on 18 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts