‚̧Next Perpendicular Moonlanding
    Wondering what‚Äôs next for npm?Check out our public roadmap! ¬Ľ

    insales

    2.0.2¬†‚Äʬ†Public¬†‚Äʬ†Published

    InSales

    Build Status Coverage Status Dependencies NPM version ESDoc

    InSales module that allows you to communicate with the InSales API from node.js

    Installation

    npm install insales --save
    

    Usage

    // Import a module
    import InSales from 'insales';
    // Create an instance with your API credentials
    const insales = InSales({
      id: 'your app id',
      secret: 'your app secret'
    });
     
    // Get things done
    insales.getAccount({
      token: 'token for shop',
      url: 'shop-test.myinsales.ru'
    }).then(output => {
      console.info(output.data);
    }).catch(err => {
      console.error(err);
    });

    API limits

    insales.getAccount({
      token: 'token for shop',
      url: 'shop-test.myinsales.ru'
    }).then(output => {
      console.info(output.callLimits); //  { remaining: 498, current: 2, max: 500 } }
    })

    Methods

    Account

    getAccount

    Charge

    createCharge
    getCharge
    listCharge
    removeCharge

    Collection

    getCollection
    listCollection

    Coupon

    createCoupon
    editCoupon
    getCoupon
    listCoupon
    removeCoupon

    File

    createFile
    getFile
    removeFile
    uploadFile

    JsTag

    createJsTag

    Price Kind

    createPriceKind
    editPriceKind
    getPriceKind
    listPriceKind
    removePriceKind

    Product

    createProduct
    getProduct
    listProduct

    Recurring

    createRecurring
    getRecurring
    removeRecurring

    Token

    token

    TODO

    Add other APIs

    Install

    npm i insales

    DownloadsWeekly Downloads

    1,623

    Version

    2.0.2

    License

    MIT

    Unpacked Size

    82.7 kB

    Total Files

    25

    Last publish

    Collaborators

    • avatar