Socket
Socket
Sign inDemoInstall

cc-finance-api

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cc-finance-api

api finance


Version published
Weekly downloads
8
Maintainers
1
Install size
19.6 kB
Created
Weekly downloads
 

Readme

Source

Code Craft - Finance Api

This package is a library that is used to make http requests to the Finance API.

INSTALLING

via npm

  • npm install cc-finance-api

from source

  • git clone https://bitbucket.org/FinoCodeLab/cc-finance-api.git

REQUIREMENTS

  • MeteorJS
  • NodeJs
  • Npm

HOW IS IT USED?

var financeApi = new(require('cc-finance-api'))({key:'', url: '', debug_mode: false});
OR
var CCFinanceApi = require('cc-finance-api');
var financeApi = new CCFinanceApi({key:'', url: '', debug_mode: false});
PARAMS
  • key: String, Security key generated by finance.
  • url: String, Endpoint ej: http://www.domine.com
  • debug_mode: Boolean, This parameter by default is false.

let url = '/my/route';
let data: {
    ...
};

financeApi.get(url, data).then(res => {
    console.log(res);
}).catch(err => {
    console.log(err);
});
PARAMS
  • url: String, final part of the endpoint, ex: /my/route
  • data: Object

If you want to make a request to an endpoint other than the one entered in the initial configuration parameters, you can send the variable overwriteEndpoint: true within the same object "data". This parameter indicates that the endpoint will be replaced by the url that is being entered in the method. Ex:

let url = 'http://www.dominio.com/api/my/route';
let data: {
    overwriteEndpoint: true,
    ...,
    ...,
};

financeApi.get(url, data).then(res => {
    console.log(res);
}).catch(err => {
    console.log(err);
});

NOTA: All methods use promises.


AVAILABLE METHODS

  • GET
  • POST
  • PUT
  • DELETE

Keywords

FAQs

Last updated on 21 Mar 2018

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