]>
iEval git - www-backpacktf.git/blob - MarketItem.pm
843ac60b091152620e7677ee19d07ab7add20c07
1 package WWW
::BackpackTF
::MarketItem
;
6 our $VERSION = '0.002';
9 my ($class, $name, $content) = @_;
10 $content->{name
} = $name;
11 bless $content, $class
14 sub name
{ shift->{name
} }
15 sub last_updated
{ shift->{last_updated
} }
16 sub quantity
{ shift->{quantity
} }
17 sub value
{ shift->{value
} }
26 WWW::BackpackTF::MarketItem - Class representing market item information
31 use Data::Dumper qw/Dumper/;
32 use POSIX qw/strftime/;
34 my $bp = WWW::BackpackTF->new(key => '...');
35 my @items = $bp->get_market_prices;
37 say 'Name: ', $item->name;
38 say strftime 'Last updated on: %c', localtime $item->last_updated;
39 say 'Quantity available on market: ', $item->quantity;
40 say 'Value of item: $', sprintf '%.2f', $item->value / 100;
44 WWW::BackpackTF::MarketItem is a class representing Steam Community
45 Market price information about an item.
57 The timestamp of this information, as seconds since unix epoch.
61 How many items of this kind are there on the SCM.
65 The price this item is selling for, in cents (USD 0.01).
73 L<http://backpack.tf/api/docs/IGetMarketPrices>
77 Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
79 =head1 COPYRIGHT AND LICENSE
81 Copyright (C) 2014-2016 by Marius Gavrilescu
83 This library is free software; you can redistribute it and/or modify
84 it under the same terms as Perl itself, either Perl version 5.18.2 or,
85 at your option, any later version of Perl 5 you may have available.
This page took 0.047116 seconds and 3 git commands to generate.