NAME
Amazon::Site - A class to represent an Amazon site
SYNOPSIS
use Amazon::Site;
my $site = Amazon::Site->new(
code => 'UK',
country => 'United Kingdom',
tldn => 'co.uk',
currency => 'GBP',
sort => 1,
);
say $site->tldn; # co.uk
say $site->domain; # amazon.co.uk
say $site->asin_url('XXXXXXX'); # https://amazon.co.uk/dp/XXXXXXX
METHODS
new
Creates a new Amazon::Site object.
Parameters
- code
-
The two-letter country code.
- country
-
The country name.
- tldn
-
The top-level domain name.
- currency
-
The currency code.
- sort
-
The sort order. Used by Amazon::Sites to sort the sites.
- assoc_code
-
The optional Amazon Associate code for this site.
code
Returns the two-letter country code.
country
Returns the country name.
tldn
Returns the top-level domain name.
domain
Return the whole domain name.
currency
Returns the currency code.
sort
Returns the sort order.
assoc_code
Returns the Amazon Associate code for this site.
asin_url($asin)
Returns the URL for the ASIN on this site.
If you've defined an associate code for this site, it will be included in the URL.
COPYRIGHT
Copyright 2024, Dave Cross. All rights reserved.
LICENCE
This program is free software; you can redistribute it and/or modify it under the terms of either:
the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or
the Artistic License version 2.0.