warframestat_client 4.2.10 copy "warframestat_client: ^4.2.10" to clipboard
warframestat_client: ^4.2.10 copied to clipboard

A simple client wrapper around WFCD worldstate api with included models for warframe-items.

example/main.dart

// ignore_for_file: avoid_print it's an example

import 'package:warframestat_client/warframestat_client.dart';

Future<void> main() async {
  final worldstateClient = WorldstateClient();
  final worldstate = await worldstateClient.fetchWorldstate();

  print(worldstate.timestamp);

  final itemsClient = WarframeItemsClient();

  // Search returns minimal results. You should use fetchItem() if you want the
  // full item
  final results = await itemsClient.search('AfterBurner');
  print(results.first.name);
  print(results.first.wikiaUrl);

  final item = await itemsClient.fetchItem('/Lotus/Powersuits/Archwing/DemolitionJetPack/ExhaustTrailAugmentCard');

  print(item?.name);

  final synthTargetClient = SynthTargetClient();
  // If you find a target that isn't in here you can make a PR here
  // https://github.com/WFCD/warframe-worldstate-data
  final targets = await synthTargetClient.fetchTargets();
  print(targets.first.name);

  // playId comes from either EE.log or Warframe login cookie
  final profileClient = ProfileClient(playerId: 'OrnsteinTheSlayer');
  final profile = await profileClient.fetchProfile();

  print(profile.username);

  final ws = WarframestatWebsocket();

  ws.worldstate.listen((data) => print(data.timestamp));
}
1
likes
160
points
178
downloads

Publisher

verified publisherwarframestat.us

Weekly Downloads

A simple client wrapper around WFCD worldstate api with included models for warframe-items.

Homepage
Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

collection, equatable, http, json_annotation, meta, web_socket_client

More

Packages that depend on warframestat_client