package Net::EANSearch;
use strict;
use warnings;
use LWP;
use JSON;
use URL::Encode;
use MIME::Base64 qw(decode_base64);
require Exporter;
our @ISA = qw(Exporter);
# Items to export into callers
19;
our $BULGARIAN = 20;
our $GREEK = 21;
my $BASE_URI = 'https://api.ean-search.org/api?format=json&token=';
my $MAX_API_TRIES = 3; # retry, eg. on 429 error
sub new {
my $class = shift;
my $tok
my $lang = shift || 1;
my $json_str = $self->_apiCall($self->{base_uri} . "&op=barcode-lookup&ean=$ean&language=$lang");
my $json = decode_json($json_str);
return $json->[0];
}
sub isbnLookup {