GithubHelp home page GithubHelp logo

frappeclient-php's Introduction

FrappeClient-PHP (API Wrapper)

  • ERPNext is trademark of Frappe Technologies Pvt. Ltd.
  • Copyright 2013 Frappe Techlogies Pvt Ltd.
  • This code is licensed under the GNU General Public Lisense (v3) and the Documentation is licensed under Creative Commons (CC-BY-SA-3.0)
  • See. https://frappe.io/help/rest_api

Security notes

  • DO NOT put config.php and cookie.txt into public accessable area.

Requirements

  • ERPNext = 5.x
  • PHP = 5.x
  • curl >= 7.30.0
  • Knowledge about ERPNext and DocType
  • Knowledge about Web API

Settings

  • Set specified User for using API on ERPNext
  • Set configurations in config.php

Usage

Constructor

  • @param string usr - (Optional) User name to login - If empty, value will be set from config.
  • @param string pwd - (Optional) Password - If empty, value will be set from config.
  • @returns class FrappeClient
  • @throws FrappeClient_Exception

Searching and Getting list

  • search()
    • @params string DocType
    • @params array conditions (Optional) - Conditions for search
    • @params array fields (Optional) - Field which should be picked up
    • @params int limit_start (Optional) default 0 - Offset for pagenation
    • @params int limit_page_length (Optional) default 20 - Limit for pagenation
    • @returns class FrappeClient
    • @throws FrappeClient_Exception

Getting single data

  • get()
    • @params string DocType
    • @params string Key - Key of DocType
    • @returns class FrappeClient
    • @throws FrappeClient_Exception

Inserting data

  • insert()
    • @params string DocType
    • @params array data - Data should be inserted
    • @returns class FrappeClient
    • @throws FrappeClient_Exception

Updating data

  • update()
    • @params string DocType
    • @params string key - Key of DocType
    • @params array data - Data should be updated
    • @returns class FrappeClient
    • @throws FrappeClient_Exception

Class

FrappeClient

  • (object) body - Responce body
  • (Array) header - CURL_INFO
  • (Int) errorno - CURL_ERRORNO
  • (String) error - CURL_ERROR
  • (Boolean) is_auth - Authorized or not

Definition of terms

  • Document
    • Data unit on ERPNext.
  • DocType
    • Type of Document on ERPNext. Like a Database Table name.

frappeclient-php's People

Contributors

tmimori avatar sanjay-kumar001 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.