NAME
Lego::Part::Image::LegoCom - Lego part image class for lego.com.
SYNOPSIS
use Lego::Part::Image::LegoCom;
my $obj = Lego::Part::Image::LegoCom->new;
my $image = $obj->image;
my $image_url = $obj->image_url;
METHODS
new()
Constructor. Returns object.
part
Lego::Part object. It is required. Default value is undef.
image()
Get image. Not implemented now.
image_url()
Get image URL. Returns string with image URL.
ERRORS
new():
From Lego::Part::Image::new():
Parameter 'part' is required.
Parameter 'part' must be Lego::Part object.
From Class::Utils::set_params():
Unknown parameter '%s'.
image():
This is abstract class. image() method not implemented.
image_url():
Element ID doesn't defined.
EXAMPLE
# Pragmas.
use strict;
use warnings;
# Modules.
use Lego::Part;
use Lego::Part::Image::LegoCom;
# Object.
my $obj = Lego::Part::Image::LegoCom->new(
'part' => Lego::Part->new(
'element_id' => '300321',
),
);
# Get image URL.
my $image_url = $obj->image_url;
# Print out.
print "Part with element ID '300321' URL is: ".$image_url."\n";
# Output:
# Part with element ID '300321' URL is: http://cache.lego.com/media/bricks/5/2/300321.jpg
DEPENDENCIES
Error::Pure, Lego::Part::Image.
SEE ALSO
Lego::Part::Image, Lego::Part::Image::LugnetCom, Lego::Part::Image::PeeronCom.
REPOSITORY
https://github.com/tupinek/Lego-Part-Image
AUTHOR
Michal Špaček mailto:skim@cpan.org
LICENSE AND COPYRIGHT
© 2015 Michal Špaček
BSD 2-Clause License
VERSION
0.01