npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

restapi-erpnext

v1.0.10

Published

Modulo para consumir a la API REST de APIRESTERPNext V10+

Downloads

44

Readme

restapi-erpnext

Este modulo esta diseñado para consumir a la API REST de APIRESTERPNext V10+ usala para consumir los servicios de su APIRESTERPNext, esta libreria esta realizada apartir de la base y aporte de pawanpandey4zip y pawangspandey, basandonos en la documentacion de frape y dandole opcion a los desarrolladores MEAN se hace publica esta libreria con el fin de reusarla y mejorarla

Dice frappe en su Documentación

Frappe.io se envía con una API HTTP que se puede clasificar en Llamadas a procedimiento remoto (RPC), para llamar a los métodos de la lista blanca y la transferencia de estado representacional (REST), para manipular recursos.

La URL base es https: // {su instancia de frappe}. Todas las solicitudes que se muestran aquí deben agregarse al final de su URL base. Por ejemplo, si su instancia es demo.erpnext.com, GET / api / resource / User significa GET https://demo.erpnext.com/api/resource/User.

Todos los documentos en Frappe están disponibles a través de una API RESTful con el prefijo / api / resource /. Puede realizar todas las operaciones de CRUD en ellos:

Crear

Puede crear un documento enviando una solicitud POST al punto final, / api / resource / {doctype}.

Leer

Puede obtener un documento por su nombre utilizando el punto final, / api / resource / {doctype} / {name}

Actualizar

Puede crear un documento enviando una solicitud PUT al punto final, / api / resource / {doctype} / {nombre}. Esto actúa como una solicitud de PATCH HTTP en la que no tiene que enviar todo el documento sino solo las partes que desea cambiar.

Borrar

Puede eliminar un documento por su nombre enviando una solicitud DELETE al punto final, / api / resource / {doctype} / {name}.

var APIRESTERPNext = require('restapi-erpnext');

var APIRESTERPNext = new APIRESTERPNext({
    username : 'Usuario',
    password : 'Clave',
    baseUrl  : 'http://localhost:8000' //Erpnext Instalado V10+ Porduccion u Develop
})

Installation

$ npm install restapi-erpnext

Recursos

Puede Usar los Métodos de petición HTTP (GET, POST,PUT,DELETE) + EL recurso a usar ejemplo Metodo GET Los Argumentos de la funcion trabajan de la siguiente manera

'/api/resource/User', 'GET', null

  1. Recurso a Utilizar (Este puede ser de tipo '/api/resource/User' o 'api/method/frappe.auth.get_logged_user')
  2. Metodo (GET, GETID ,POST,PUT,DELETE)
  3. Parametros del recurso; En dado caso que sea tipo GET Este ultimo se envia NUll para los demas caso este es Obligatorio, Si intentas Acceder al recurso enviando los parametros nullos Devolvera Error *500

Nota: Si deseas enviar mas parametros en el HEADER de la peticion Escribeme : [email protected]


//Vamos a traer todos los Usuarios Registrados en NUestro ERP  

APIRESTERPNext.sainterpnext('/api/resource/User', 'GET', null).then(function (res) {
  console.log('Resultado', res);
})
//Puedes Probar los demas Metodos.