This repository has been archived by the owner on Oct 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redirect to `swell-node` project
- Loading branch information
Showing
1 changed file
with
5 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,8 @@ | ||
## Swell API library for NodeJS | ||
## Deprecated | ||
|
||
[Swell](https://www.swell.is) 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. | ||
:warning: **This package has been deprecated!** :warning: | ||
|
||
## Install | ||
This project has been merged with the `swell-node` project: | ||
|
||
npm install swell-node-http --save | ||
|
||
## Connect | ||
|
||
```javascript | ||
const { swell } = require('swell-node-http'); | ||
|
||
swell.init('my-store', 'secret-key'); | ||
``` | ||
|
||
To connect to multiple stores in the same process, use `swell.createClient()`: | ||
|
||
```javascript | ||
const { swell } = require('swell-node-http'); | ||
|
||
const client1 = swell.create('my-store-1', 'secret-key-1'); | ||
const client2 = swell.create('my-store-2', 'secret-key-2'); | ||
``` | ||
|
||
## Usage | ||
|
||
```javascript | ||
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 | ||
- NPM: https://npmjs.com/package/swell-node | ||
- GitHub: https://github.com/swellstores/swell-node |