apetito_product_api_client 1.0.0-nullsafety.1 copy "apetito_product_api_client: ^1.0.0-nullsafety.1" to clipboard
apetito_product_api_client: ^1.0.0-nullsafety.1 copied to clipboard

outdated

A client for accessing the apetito Product API. Please note that the apetito Product API Client is unofficial and not endorsed by apetito.

apetito Product API Client #

A client for accessing the apetito Product API.

Please note that the apetito Product API Client is unofficial and not endorsed by apetito.

Usage #

A simple usage example:

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

Future<void> main() async {
  final client = _AuthenticatedClient();

  final api = ApetitoProductApiClient(
    client: client,
  );

  for (var product in await api.products.get()) {
    print(product);
  }

  client.close();
}

class _AuthenticatedClient extends BaseClient {
  @override
  Future<StreamedResponse> send(BaseRequest request) {
    final _ = Request(
      request.method,
      request.url,
    );

    _.headers['Authorization'] = 'Bearer ACCESS_TOKEN';

    return _.send();
  }
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

1
likes
0
pub points
9%
popularity

Publisher

verified publisherthomasclark.dev

A client for accessing the apetito Product API. Please note that the apetito Product API Client is unofficial and not endorsed by apetito.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http, json_annotation

More

Packages that depend on apetito_product_api_client