1.1.1 • Published 7 months ago

cobre-facil v1.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

Logo

BIBLIOTECA DE COMUNICAÇÃO COM A COBRE FACIL

ESTA BIBLIOTECA FACILITA NA HORA DE FAZER A COMUNICAÇÃO. OBS: NÃO ESTÃO TODOS ENDPOINTS MAPIADOS

REQUISITOS

INSTALAÇÃO DOS REQUISITOS

INSTALE O node-fetch EM SEU PROJETO

 npm install node-fetch
 yarn add node-fetch

INSTALAÇÃO

 npm install cobre-facil
 yarn add cobre-facil

PARA INICAR A BIBLIOTECA

Para iniciar a biblioteca você tem que importar ela e chamar o INIT passando APPID, SECRET, PRODUCTION.

const cobrefacil = require('cobre-facil'); cobrefacil.init(APPID, SECRET, PRODUCTION);

APPID => CREDENCIAL QUE VOCE PEGA NO PAINEL DA COBRE FACIL. SECRET => CREDENCIAL QUE VOCE PEGA NO PAINEL DA COBRE FACIL. PRODUCTION => SE ESTA EM PRODUÇÃO OU EM SANBOX - default false

Uso/Exemplos

const cobrefacil = require('cobre-facil');
cobrefacil.init(process.env.APP_ID_TESTE, process.env.SECRET_TESTE);
require('dotenv').config();

module.exports =
{
    async TodosEndPoints(req, res) {
        try {
          const Result =   await cobrefacil.authenticate();
          console.log(Result);

            return res.json({ "sucesso": true});
        } catch (error) {
            console.log(error);
            return res.status(400).json({ "sucesso": false, 'error': error });
        };
    }

};

Documentação da cobre facil

TODOS OS OBJETOS A SEREM PASSADOS SÃO OS MESMOS QUE A DCUMENTAÇÃO PEDI NOS ENDPOINTS

Documentação

1.1.1

7 months ago

1.1.0

7 months ago

1.0.9

7 months ago

1.0.8

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago