X-Git-Url: http://git.ieval.ro/?p=www-backpacktf.git;a=blobdiff_plain;f=lib%2FWWW%2FBackpackTF.pm;h=ad39d73175774356775477f0a1d31cd1cedb246d;hp=af3511ff372aedc2dbce18c4faa481c2d0bedb5e;hb=0aaa9b980d349153117dbfa46a4dfae24ace1e25;hpb=921096c3dd19c68c1045e3119600364b69de5af7 diff --git a/lib/WWW/BackpackTF.pm b/lib/WWW/BackpackTF.pm index af3511f..ad39d73 100644 --- a/lib/WWW/BackpackTF.pm +++ b/lib/WWW/BackpackTF.pm @@ -4,10 +4,10 @@ use 5.014000; use strict; use warnings; use parent qw/Exporter/; -our $VERSION = '0.000_003'; +our $VERSION = '0.001001'; our @EXPORT_OK = qw/TF2 DOTA2/; -use constant +{ +use constant +{ ## no critic (Capitalization) TF2 => 440, DOTA2 => 570, CSGO => 730, @@ -38,9 +38,9 @@ sub request { $url = $self->{base} . $url; $url .= "&$_=$params{$_}" for keys %params; my $htr = $ht->get($url); - die $htr->{reason} unless $htr->{success}; + die $htr->{reason} unless $htr->{success}; ## no critic (RequireCarping) my $response = decode_json($htr->{content})->{response}; - die $response->{message} unless $response->{success}; + die $response->{message} unless $response->{success}; ## no critic (RequireCarping) $response } @@ -72,6 +72,8 @@ sub get_currencies { 1; __END__ +=encoding utf-8 + =head1 NAME WWW::BackpackTF - interface to the backpack.tf trading service @@ -216,7 +218,7 @@ Marius Gavrilescu, Emarius@ieval.roE =head1 COPYRIGHT AND LICENSE -Copyright (C) 2014 by Marius Gavrilescu +Copyright (C) 2014-2016 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,