FastAdService class

A service class to interact with the Fastyle Ad API.

Constructors

FastAdService.new(String uriAuthority, {String? debugLabel = 'FastAdService', Duration? ttl})
Constructs an instance of FastAdService with the provided uriAuthority.

Properties

debugLabel String?
A debug label to be used for debugging purposes.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
ttl Duration
The time-to-live duration for cached data.
latefinal
uriAuthority String
The authority of the URI to be used for API requests.
final

Methods

dispose() → void
This method is used to release the resources used by the FastAdService instance. It should be called when the FastAdService instance is no longer needed.
getAdByCountryAndLanguage(String country, String language, {String? providerId, String? appId, int? limit}) Future<FastResponseAd?>
Retrieves an advertisement by country and language from the API.
getAdById(String adId) Future<FastResponseAd?>
Retrieves an advertisement by its ID from the API.
getAdByLanguage(String language, {String? appId, String? providerId, int? limit}) Future<FastResponseAd?>
Retrieves an advertisement by language from the API.
getAdsByCountryAndLanguage(String country, String language, {String? appId, String? providerId, int? limit}) Future<List<FastResponseAd>>
Retrieves a list of advertisements by country and language from the API.
getAdsByLanguage(String language, {String? providerId, String? appId, int? limit}) Future<List<FastResponseAd>>
Retrieves a list of advertisements by language from the API.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited