apple_search_ads 0.0.7 copy "apple_search_ads: ^0.0.7" to clipboard
apple_search_ads: ^0.0.7 copied to clipboard

A Dart package to interact with the Apple Search Ads API using OAuth 2.0 authentication.

example/apple_search_ads_example.dart

import 'package:apple_search_ads/apple_search_ads.dart';
import 'package:flutter/material.dart';

Future<void> main() async {
  final authenticator = AppleSearchAdsAuthenticator(
    clientId: "YOUR-CLIENT",
    teamId: "YOUR-TEAM-ID",
    orgId: "YOUR-ORG-ID",
    keyId: "YOUR-KEY-ID",
    keyContent: """
      -----BEGIN EC PRIVATE KEY-----
      YOUR-PRIVATE-KEY-CONTENT
      -----END EC PRIVATE KEY-----
      """,
    verbose: true,
  );

  final accessToken = await authenticator.authenticate();
  if (accessToken != null) {
    debugPrint("Authenticated successfully with access token: $accessToken");
    authenticator.fetchData();
  } else {
    debugPrint("Failed to authenticate");
  }
}
copied to clipboard
3
likes
140
points
33
downloads

Publisher

unverified uploader

Weekly Downloads

2024.07.06 - 2025.01.18

A Dart package to interact with the Apple Search Ads API using OAuth 2.0 authentication.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

dart_jsonwebtoken, flutter, http, json_annotation

More

Packages that depend on apple_search_ads