]>
iEval git - www-backpacktf.git/blob - lib/WWW/BackpackTF/MarketItem.pm
1 package WWW
::BackpackTF
::MarketItem
;
6 our $VERSION = '0.002001';
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).
71 L<http://backpack.tf/api/docs/IGetMarketPrices>
75 Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
77 =head1 COPYRIGHT AND LICENSE
79 Copyright (C) 2014-2017 by Marius Gavrilescu
81 This library is free software; you can redistribute it and/or modify
82 it under the same terms as Perl itself, either Perl version 5.18.2 or,
83 at your option, any later version of Perl 5 you may have available.
This page took 0.048778 seconds and 4 git commands to generate.