medusa-lib
TypeScript icon, indicating that this package has built-in type declarations

0.0.26 • Public • Published

medusa-lib Build Status codecov

Medusa API Wrapper

Install

$ yarn add medusa-lib

Usage

const Medusa = require('medusa-lib');
 
const medusa = new Medusa({ url: 'http://localhost:8081/' });
 
// Authentication will last as long as the JWT expiry
// By default Medusa ships with a 24 hour expiry
medusa.auth({ username: 'OmgImAlexis', password: 'SuperStrongPassword!' });
 
// If you need longer than 24 hours and don't want to store
// the user's credentials we suggest trying the apiKey method for now
medusa.auth({ apiKey: 'sample-api-key' });
 
medusa.config({ torrents: { enabled: false } }).then(config => console.log(config));
// { torrents: { enabled: false } }
 
medusa.config().then(config => console.log(config.torrents.enabled));
// { torrents: { enabled: false } }

License

MIT © Alexis Tyler

Package Sidebar

Install

npm i medusa-lib

Weekly Downloads

3

Version

0.0.26

License

MIT

Unpacked Size

2.14 MB

Total Files

11

Last publish

Collaborators

  • omgimalexis