donuz_dart_sdk 1.0.47 copy "donuz_dart_sdk: ^1.0.47" to clipboard
donuz_dart_sdk: ^1.0.47 copied to clipboard

Donuz Dart SDK to comunicate with Donuz API, Abstracting Logics of login and caching requests, on all avaliable modules exposed in Donuz API.

DONUZ Dart SDK #

A Sdk foi criada com o proposito de facilitar o uso para os clientes da Donuz com uma forma intuitiva de utilizar as apis e facilitar o desenvolvimento de aplicações com flutter/dart

Instalação #

a) Add in your pubspec.yaml:

dependencies:
donuz_dart_sdk: <last-version>

or use:

dart pub add donuz_dart_sdk

b) Run:

    flutter pub get

c) init SDK:


late DonuzSDK donuzSDK;
void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  donuzSDK = DonuzSDK(
      config: DonuzConfig(donuzToken: '<YOUR TOKEN>', appId: '<YOUR APPID>'));
  await donuzSDK.init();

  runApp(const MyApp());
}

Examples #

Retorna as informações do estabelecimento informado no appId na configuracão da sdk #

    donuzSDK.establisment.findEstablishmentById();

Retorna todos os prêmios cadastrados. #

    await donuzSDK.prizes.getPrizes();

Faz o Login do usuario #

   await donuzSDK.user.makeLogin(username: '12345678909',password: '12345678909');

Faz o Logout do usuario. #

  await donuzSDK.user.makeLogout();
0
likes
130
pub points
49%
popularity

Publisher

unverified uploader

Donuz Dart SDK to comunicate with Donuz API, Abstracting Logics of login and caching requests, on all avaliable modules exposed in Donuz API.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, get_it, http, intl, shared_preferences

More

Packages that depend on donuz_dart_sdk