frappe_dart 0.0.5 copy "frappe_dart: ^0.0.5" to clipboard
frappe_dart: ^0.0.5 copied to clipboard

A comprehensive Dart wrapper for interacting with the Frappe API, providing easy access to its features and enabling seamless communication with Frappe-based systems.

example/example.dart

import 'package:frappe_dart/frappe_dart.dart';

void main() async {
  final frappe = FrappeV15(
    baseUrl: 'https://your-frappe-url.com',
  );

  try {
    final authResponse = await frappe.login(
      LoginRequest(
        usr: 'your-username',
        pwd: 'your-password',
      ),
    );

    frappe.cookie = authResponse.cookie;

    final sidebarItems = await frappe.getDeskSideBarItems();

    final page = sidebarItems.message!.pages!
        .firstWhere((element) => element.name == 'Users');

    final deskPage = await frappe.getDesktopPage(
      DesktopPageRequest(
        name: page.name,
      ),
    );

    print(deskPage.toJson());
  } catch (error) {
    print('Error: $error');
  }
}
6
likes
160
points
2.5k
downloads

Publisher

verified publisherkinet.et

Weekly Downloads

A comprehensive Dart wrapper for interacting with the Frappe API, providing easy access to its features and enabling seamless communication with Frappe-based systems.

Repository (GitHub)
View/report issues

Topics

#frappe #api #dart

Documentation

API reference

License

MIT (license)

Dependencies

http

More

Packages that depend on frappe_dart