1.0.2 • Published 7 years ago
judicial-info v1.0.2
Antecedentes Judiciales Colombia
Módulo NPM para consultar su antecedente judicial (Colombia).
Web Policia Nacional : https://antecedentes.policia.gov.co:7005/WebJudicial/index.xhtml
Instalación
$ npm i judicial-infoPrimera prueba
const { getJudicialInfo } = require('judicial-info');
getJudicialInfo('9173821')
  .then(res => console.log(res))
  .catch(err => console.log(err));
(async () => {
  try {
    const response = await getJudicialInfo('9173821');
    console.log(response);
  } catch (err) {
    console.log(err);
  }
})();  Respuesta exitosa:
  {
    error: null,
    warn: null,
    user: {
      identification: '9173821',
      name: 'PIÑA ACOSTA RODOLFO RAFAEL',
      result: 'NO TIENE ASUNTOS PENDIENTES CON LAS AUTORIDADES JUDICIALES'
    }
  }
  Respuestas fallida (Seguir intentando)
  1) Error
    {
      error: "Debe ingresar el texto de la imagen.. Intente nuevamente",
      warn: "null Intente nuevamente",
      user: null
    }
  2) Warn
    {
      error: "null Intente nuevamente",
      warn: "Captcha. El texto ingresado debe corresponder al de la imagen. Intente nuevamente",
      user: null
    }