apetito_product_api_client 1.0.2 copy "apetito_product_api_client: ^1.0.2" to clipboard
apetito_product_api_client: ^1.0.2 copied to clipboard

A client for accessing the apetito Product API.

example/apetito_product_api_client_example.dart

import 'package:apetito_product_api_client/apetito_product_api_client.dart';
import 'package:oauth2/oauth2.dart';

Future<void> main() async {
  final client = await clientCredentialsGrant(
    Uri.https('identity.apetito.co.uk', '/connect/token'),
    'client_id',
    'client_secret',
    scopes: ['Products.Read.All'],
  );

  final api = ApetitoProductApiClient(
    client: client,
  );

  for (var product in await api.productService.getProducts()) {
    print(product);
  }

  client.close();
}
2
likes
150
points
130
downloads

Publisher

verified publisherapetito.co.uk

Weekly Downloads

A client for accessing the apetito Product API.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

http

More

Packages that depend on apetito_product_api_client