fortnite 1.0.8 copy "fortnite: ^1.0.8" to clipboard
fortnite: ^1.0.8 copied to clipboard

outdated

A fortnite api manager library in dart. This library allows you to easily communicate with fortnite api and manage your account.

example/example.dart

import "package:fortnite/fortnite.dart";
import "package:logging/logging.dart";

// main function
void main() async {
  String authorizationCodeURL = getAuthorizationCodeURL(
    forceLogin: false,
  ); // get an authorization code url
  print(authorizationCodeURL); // print the url to the console

  // * get an authorization code from previous url and use it to create a device auth.
  // * a device auth dont gets invalid until you forcefully delete it or change your password.
  DeviceAuth deviceAuth = await authenticateWithAuthorizationCode(
    "13656257585e47aa945b761e88903ab3", // authorization code
  );
  // cache the device auth by saving in some file or database for future use

  // create a client object with the device auth
  final Client client = Client(
    options: ClientOptions(
      log: true,
      deviceAuth: deviceAuth,
      logLevel: Level.ALL,
    ),
  );

  print(client.displayName); // print the account id of the client

  // rest of your code
}
4
likes
0
pub points
0%
popularity

Publisher

verified publishervanxh.dev

A fortnite api manager library in dart. This library allows you to easily communicate with fortnite api and manage your account.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

dio, logging

More

Packages that depend on fortnite