1.1.1 • Published 7 years ago
mspecs v1.1.1
Mspecs API Wrapper for Node.js
Fully-typed, generated api wrapper for mspecs based on the official documentation.
Motivation
TODO
Usage
npm install --save mspecs
import { MspecsClient } from 'mspecs';
const client = new MspecsClient({
  host: 'https://api.mspecs.se', // tested with demo.mspecs.se and api.mspecs.se
  auth: {
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD'
  }
});
const deals = await client.deals.all({
  collections: ['sellers'],
  limit: 5
});Custom Fields
Custom fields aren't fully typed right now. It's on the todo list to add some way to overload those definitions.
const deal = await client.deals.byId('M4341fdf53d..', { customFields: true });
console.log(deal.customFieldValues)Generating types
TODO
Todo
- Tests
 - Refactor and structure generation
 - Add support for different mspecs versions (demo & api)
 - Add support for more languages, f.e. C♯.
 - Add more examples