proto_base_client 2.1.1-dev copy "proto_base_client: ^2.1.1-dev" to clipboard
proto_base_client: ^2.1.1-dev copied to clipboard

A Flutter package for integrating ProtoBase authentication and database operations, providing easy-to-use methods for email, username, and API token-based authentication.

ProtoBase Client #

ProtoBase Client is a simple and lightweight Dart package designed to help developers integrate authentication and database functionalities with ease. It provides methods for signing up and signing in using email or username through the ProtoBase API, as well as methods for database operations.

Features #

  • Email-Based Authentication:

    • Sign up using email, password, and username.
    • Sign in using email, password, and username.
  • Username-Based Authentication:

    • Sign up using a username and password.
    • Sign in using a username and password.
  • API Token-Based Usage:

    • Obtain your API key from the official website.
    • Use the API key to authenticate your requests.
  • Database Operations:

    • Create tables.
    • Insert data into tables.
    • Read data from tables.
    • Update data in tables.
    • Delete data from tables.

Installation #

Add the following to your pubspec.yaml file:

dependencies:
  proto_base_client: ^2.1.1-dev
copied to clipboard

Run flutter pub get to install the package.

Usage #

import 'package:proto_base_client/proto_base_client.dart';

void main() async {
  final client = ProtoBaseApiClient();
  final dbClient = ProtoBaseDatabaseClient();
  
  // Example usage for authentication
  final signupResponse = await client.signupWithEmail(
    'username',
    'password',
    'email@example.com',
    'api_token',
  );
  print(signupResponse);

  // Example usage for database operations
  final createTableResponse = await dbClient.createTable(
    'api_token',
    'username',
    'project_name',
    'table_name',
    ['column1', 'column2'],
    ['type1', 'type2'],
  );
  print(createTableResponse);
}
copied to clipboard

API Endpoints #

This package interacts with the following API endpoints:

  • /auth_api/email-signup/
  • /auth_api/email-signin/
  • /auth_api/user-signup/
  • /auth_api/user-signin/
  • /db_api/create_table
  • /db_api/insert_data
  • /db_api/read_data
  • /db_api/update_data
  • /db_api/delete_data

License #

This package is licensed under the MIT License. See the LICENSE file for details.


1
likes
160
points
40
downloads

Publisher

verified publisherknowledgetotal.com

Weekly Downloads

2024.08.11 - 2025.02.23

A Flutter package for integrating ProtoBase authentication and database operations, providing easy-to-use methods for email, username, and API token-based authentication.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_secure_storage, http

More

Packages that depend on proto_base_client