dart_roadsdata_http 1.0.0 copy "dart_roadsdata_http: ^1.0.0" to clipboard
dart_roadsdata_http: ^1.0.0 copied to clipboard

Integrate Roadsdata seamlessly in your Dart app with our HTTP Client package, featuring advanced network handling and automatic retries.

RoadsData Logo

Roadsdata Dart HTTP Client #

A Dart package for interacting with the Roadsdata API, featuring robust error handling and retry mechanisms using the dio and dio_smart_retry packages.

Table of Contents #

Introduction #

This package provides an easy-to-use HTTP client for the Roadsdata API, supporting operations like checking advertisements for containers, performing test ad checks, and tracking user actions. It's designed to seamlessly handle network issues by implementing automatic retries.

Installation #

To add the package to your Dart or Flutter project, include the following in your pubspec.yaml file:

dependencies:
  dio: ^4.0.0
  dio_smart_retry: ^2.0.0

Then run:

flutter pub get

Features #

  • Configurable HTTP client with custom timeouts and headers.
  • Automatic retries on failure with custom delay strategy.
  • Support for both anonymous and authenticated requests.
  • Easy tracking of user actions like click, impression, and close.

Dependencies #

  • dio: A powerful Dart HTTP client for making requests.
  • dio_smart_retry: Adds retry functionality to Dio requests.

Configuration #

See the RoadsdataHttpClient.init method for initial configuration. Adjust the base URL, headers, and retry policies as needed.

Usage #

Initialize the dart http client with RoadsdataHttpClient.init. Use the httpClient's function to use integrate Roadsdata in your custom implementation.

var httpClient = RoadsdataHttpClient.init(
      host: 'YOUR_HOST',
      clientId: 'YOUR_CLIENT_ID',
      accessToken: 'YOUR_ACCES_TOKEN',
      uuid: 'YOUR_UUID'
    );
httpClient.checkAdForContainer('CONTAINER_ID')

Additional information #

If you want to know more about Roadsdata, visit https://roadsdata.it/

0
likes
150
pub points
0%
popularity

Publisher

verified publisherdeepcube.eu

Integrate Roadsdata seamlessly in your Dart app with our HTTP Client package, featuring advanced network handling and automatic retries.

Homepage

Documentation

API reference

License

MIT (LICENSE)

Dependencies

dio, dio_smart_retry

More

Packages that depend on dart_roadsdata_http