treasury_direct 0.1.0 copy "treasury_direct: ^0.1.0" to clipboard
treasury_direct: ^0.1.0 copied to clipboard

outdated

A Dart library package to access the debt of the United States from the US Treasury Direct site.

example/example.dart

import 'package:treasury_direct/treasury_direct.dart';
import 'package:treasury_direct/src/debt_entry.dart';

void main() async {
  final td = TreasuryDirect();
  final list = await td.downloadDebtFeedAsync(pagesize: 15);

  print('Total possible rows: ${list.totalRows}');

  print('Total row received: ${list.mostRecentList.length}');
  for (DebtEntry entry in list.mostRecentList) {
    print(
        '${DebtEntry.dateFormatted(entry.effectiveDate)}: ${DebtEntry.currencyShortened(entry.totalDebt, false)}');
  }
}
1
likes
0
pub points
0%
popularity

Publisher

verified publisherlarryaasen.com

A Dart library package to access the debt of the United States from the US Treasury Direct site.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

async, convert, http, intl

More

Packages that depend on treasury_direct