WWW::BackpackTF::Item - Class representing item information
use WWW::BackpackTF qw/VINTAGE GENUINE UNUSUAL/; use Data::Dumper qw/Dumper/; my @items = $bp->get_prices; my $item = $items[0]; say 'Name: ', $item->name; say 'Linked defindexes: ', join ' ', $item->defindex; say 'Price of Unique, Tradable, Craftable version: ', $item->price; say 'Price of Vintage, Tradable, Craftable version: ', Dumper $item->price(VINTAGE); say 'Price of Vintage, Non-Tradable, Craftable version: ', Dumper $item->price(VINTAGE, 0); say 'Price of Genuine, Non-Tradable, Non-Craftable version: ', Dumper $item->price(GENUINE, 0, 0); say 'Price of Unusual, Tradable, Craftable version with effect 10: ', Dumper $item->price(UNUSUAL, 1, 1, 10);
WWW::BackpackTF::Item is a class representing price information about an item.
The name of the item.
In list context, a list of defindexes linked to the item. In scalar context, the first such defindex.
The price of an item. Takes four optional arguments: the quality (defaults to 6, which is Unique), the tradability of the item (defaults to true), the craftability of an item (defaults to true), and the priceindex (crate series/unusual effect, defaults to none).
Returns an hashref with the following keys/values:
The currency the item's price is in.
The price.
If present, the upper range of the price range.
The price in the lowest currency, without rounding. Only present if get_prices was called with a true value for $raw.
Timestamp of last price update.
The difference bitween the former price and the current price. 0 if the current price is new.
http://backpack.tf/api/prices
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.