WWW::BackpackTF::Currency - Class representing currency information
my @currencies = $bp->get_currencies; my $currency = $currencies[0]; say 'Name: ', $currency->name; say 'Quality (number): ', $currency->quality; say 'Quality (human-readable): ', $currency->quality_name; say 'Priceindex: ', $currency->priceindex; say 'Craftable: ', ($currency->craftable ? 'YES' : 'NO'); say 'Tradable: ', ($currency->tradable ? 'YES' : 'NO'); say 'Singular form: ', $currency->single; say 'Plural form: ', $currency->plural; say 'Round to this many decimal places: ', $currency->round; say 'Defindex: ', $currency->defindex; say '3.15271 units of this currency is: ', $currency->stringify(3.15271); # example return values: "3.15 keys", "3.15 ref", "3.15 buds"
WWW::BackpackTF::Currency is a class representing information about a currency.
The name of the currency.
The quality integer of the currency. Usually 6 (corresponding to the Unique quality).
The quality of the currency as a human-readable string. Usually 'Unique'.
The priceindex of a currency. Indicates a crate series or unusual effect. Usually 0.
True if the currency is craftable, false otherwise. Usually true.
True if the currency is tradable, false otherwise. Usually true.
The singular form of the currency.
The plural form of the currency.
The number of decimal places this currency should be rounded to.
The definition index of the currency.
Rounds $count to the number of decimal places returned by round, then appends a space and the correct singular/plural form of the currency.
http://backpack.tf/api/currencies
Marius Gavrilescu, <marius@ieval.ro>
Copyright (C) 2014 by Marius Gavrilescu
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.18.2 or, at your option, any later version of Perl 5 you may have available.
To install WWW::BackpackTF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::BackpackTF
CPAN shell
perl -MCPAN -e shell install WWW::BackpackTF
For more information on module installation, please visit the detailed CPAN module installation guide.