Socket
Socket
Sign inDemoInstall

clearspending

Package Overview
Dependencies
51
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    clearspending

Client for ClearSpending using their API


Version published
Weekly downloads
3
Maintainers
1
Install size
5.11 MB
Created
Weekly downloads
 

Readme

Source

clearspending

Easily get, search and select for contracts, customers and suppliers on ClearSpending using their API.

Installing

Using npm:

$ npm install --save clearspending

Examples

Import module

const clearspending = require('clearspending')
const Clearspending = new clearspending()

Grants

Receive full information about the grant by the ID (get)

Clearspending
  .getGrants({
    id: '42'
  })
  .then((result) => {console.log(result)}).catch((err) => {console.log(err)})

Full-text search for grants

Clearspending
  .searchGrants({productsearch: 'бетон'})
  .then((result) => {console.log(result)}).catch((err) => {console.log(err)})
Clearspending
  .searchGrants({ogrn:'1036167000066'})
  .then((result) => {console.log(result)}).catch((err) => {console.log(err)})

Grants selection

Clearspending
  .selectGrants({daterange:'01.01.2014-31.12.2014'})
  .then((result) => {console.log(result)}).catch((err) => {console.log(err)})

Customers

Getting customer information by identifier

Clearspending
  .getCustomer({spzregnum: '01731000070'})
  .then((result) => {console.log(result)}).catch((err) => {console.log(err)})

Full-text search by customer's contracts

Clearspending
  .searchCustomers({orgtype:'3', sort:'-contractsSum'})
  .then((result) => {console.log(result)}).catch((err) => {console.log(err)})

Full-text search by customers (select)

Clearspending
  .selectCustomers({orgtype:'3', sort:'-contractsSum'})
  .then((result) => {console.log(result)}).catch((err) => {console.log(err)})

Contracts

Getting contract's information by identifier

Clearspending
  .getContracts({regnum:'0173100000414000011'})
  .then((result) => {console.log(result)}).catch((err) => {console.log(err)})

Full-text search by contracts

Clearspending
  .searchContracts({
    pricerange: '10000-50000',
    customerregion: '05',
    sort:'-price'
  })
  .then((result) => {console.log(result)}).catch((err) => {console.log(err)})

Select by contracts

Clearspending
  .selectContracts({
    industrial: 'A',
    fz: '94'
  })
  .then((result) => {console.log(result)}).catch((err) => {console.log(err)})

Suppliers

Getting supplier information by identifier

Clearspending
  .getSuppliers({
    inn: '6450614330',
    kpp: '645001001'
  })
  .then((result) => {console.log(result)}).catch((err) => {console.log(err)})

Full-text search by suppliers

Clearspending
.then((result) => {console.log(result)}).catch((err) => {console.log(err)})

Select by suppliers

Clearspending
Clearspending
  .searchSuppliers({
    regioncode: '35',
    orgform: 'i94',
    sort: '-contractsSum'
  })
  .then((result) => {console.log(result)}).catch((err) => {console.log(err)})

Recive information (statistics) about the database (number of records, update date, etc.).

Clearspending
  .dbInfo({
    info: 'all'
  })
  .then((result) => {console.log(result)}).catch((err) => {console.log(err)})

Keywords

FAQs

Last updated on 13 May 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc