Skip to content

Latest commit

 

History

History
140 lines (102 loc) · 6.49 KB

README.md

File metadata and controls

140 lines (102 loc) · 6.49 KB

Frappe Flutter API-client.

Work in progress! Endpoint naming needs refactoring from the openapi spec and rebuild this api again!

A Dart package automatically generated by the OpenAPI Generator

openapi

Unofficial documentation of the Frappe / ERPNext API.

This Dart package is automatically generated by the OpenAPI Generator project:

  • API version: 11
  • Build package: org.openapitools.codegen.languages.DartClientCodegen
  • Based on Alyf-de's Frappe api docs unofficial api documentation.

Requirements

Dart 2.0 or later

Getting Started

Add frappe_dart_api_client

dependencies:
  flutter:
    sdk: flutter
  frappe_dart_api_client:
    git: https://github.com/AlvaroMolano/openapi-frappe-dart.git

flutter pub get

import 'package:openapi/api.dart';


var api_instance = GeneralApi();
var dottedPathToMethod = frappe.auth.get_logged_user; // String | Path to the function you'd like to call, separated by dots. 

try {
    api_instance.apiMethodDottedPathToMethodGet(dottedPathToMethod);
} catch (e) {
    print("Exception when calling GeneralApi->apiMethodDottedPathToMethodGet: $e\n");
}

Documentation for API Endpoints

All URIs are relative to https://demo.erpnext.com

Class Method HTTP request Description
GeneralApi apiMethodDottedPathToMethodGet GET /api/method/{dotted_path_to_method} Call a remote procedure
GeneralApi apiMethodDottedPathToMethodPost POST /api/method/{dotted_path_to_method} Post data to a remote procedure
GeneralApi apiResourceDocTypeDocumentNameDelete DELETE /api/resource/{DocType}/{DocumentName} Delete a specific document
GeneralApi apiResourceDocTypeDocumentNameGet GET /api/resource/{DocType}/{DocumentName} Get a specific document
GeneralApi apiResourceDocTypeDocumentNamePut PUT /api/resource/{DocType}/{DocumentName} Update a specific document
GeneralApi apiResourceDocTypeGet GET /api/resource/{DocType} Get a list of documents
GeneralApi apiResourceDocTypeGet_0 GET /api/resource/DocType Get a list of Doctypes
GeneralApi apiResourceDocTypePost POST /api/resource/{DocType} Create a new document
MethodsApi apiMethodFrappeDeskTagsAddTagPost POST /api/method/frappe.desk.tags.add_tag Add a tag to a document
MethodsApi apiMethodLogoutGet GET /api/method/logout Logout from current session
MethodsApi apiMethodVersionGet GET /api/method/version Get the version of the app
MethodsApi authGetLoggedUser GET /api/method/frappe.auth.get_logged_user Get the user that is logged in
MethodsApi login POST /api/method/login Authenticate yourself
NaiveAuthenticationApi apiMethodLogoutGet GET /api/method/logout Logout from current session
NaiveAuthenticationApi authGetLoggedUser GET /api/method/frappe.auth.get_logged_user Get the user that is logged in
NaiveAuthenticationApi login POST /api/method/login Authenticate yourself
ResourcesApi apiResourceDocTypeGet GET /api/resource/DocType Get a list of Doctypes
ResourcesApi apiResourceEmployeeGet GET /api/resource/Employee Get a list of Employees
ResourcesApi apiResourceProjectGet GET /api/resource/Project Get a list of projects
ResourcesApi apiResourceTimesheetGet GET /api/resource/Timesheet Get a list of timesheets
ResourcesApi apiResourceTimesheetPost POST /api/resource/Timesheet Create a new timesheet
ResourcesApi apiResourceWebhookGet GET /api/resource/Webhook Get a list of Webhooks
ResourcesApi apiResourceWebhookPost POST /api/resource/Webhook Create a new Webhook

Documentation For Models

Documentation For Authorization

basicAuth

  • Type: HTTP basic authentication

oAuth2

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: /method/frappe.integrations.oauth2.authorize
  • Scopes:
  • all: Same permissions as the user who created the oAuth client

tokenAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Tests

TODO

  • May need to create new openapi documentation for Frappe v12 with different namming conventions and rebuild this repository.

Authors

alvaro@appsirradia.es

Credits

Thanks to the unofficial open api documentation created by raffael@alyf.de