prestashop_webservice 0.3.2 copy "prestashop_webservice: ^0.3.2" to clipboard
prestashop_webservice: ^0.3.2 copied to clipboard

A dart package for reading data from prestashop webservices

example/prestashop_webservice_example.dart

import 'package:http/http.dart';
import 'package:prestashop_webservice/prestashop_webservice.dart';

void main() async {
  final api = PrestashopApi(
      Client(),
      PrestashopApiConfig(
        apiKey: "your-secret-api-key",
        webserviceUrl: "https://example.com",
      ));

  /* Multiple entities */
  final customers = await api.customers();

  for (final customer in customers) {
    print(customer);
  }

  /* Single entity */
  final order = await api.order(7);

  print(order.orNull);
}