NAME

Lego::Part::Image::BricklinkCom - Lego part image class for bricklink.com.

SYNOPSIS

use Lego::Part::Image::BricklinkCom;

my $obj = Lego::Part::Image::BricklinkCom->new;
my $image = $obj->image;
my $image_url = $obj->image_url;

METHODS

new

my $obj = Lego::Part::Image::BricklinkCom->new;

Constructor.

  • part

    Lego::Part object.

    It is required.

    Default value is undef.

Returns instance of object.

image

my $image = $obj->image;

Get image.

Not implemented now.

image_url

my $image_url = $obj->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():
        Color doesn't defined.
        Design ID doesn't defined.

EXAMPLE

use strict;
use warnings;

use Lego::Part;
use Lego::Part::Image::BricklinkCom;

# Object.
my $obj = Lego::Part::Image::BricklinkCom->new(
        'part' => Lego::Part->new(
               'color' => 1,
               'design_id' => '3003',
        ),
);

# Get image URL.
my $image_url = $obj->image_url;

# Print out.
print "Part with design ID '3003' and color '1' URL is: ".$image_url."\n";

# Output:
# Part with design ID '3003' and color '1' URL is: https://img.bricklink.com/ItemImage/PN/1/3003.png
Lego brick with design ID '3003' and color '1'.

DEPENDENCIES

Error::Pure, Lego::Part::Image.

SEE ALSO

Lego::Part::Image

Lego part image abstract class.

Lego::Part::Image::LegoCom

Lego part image class for lego.com.

Lego::Part::Image::LugnetCom

Lego part image class for lugnet.com.

Task::Lego

Install the Lego modules.

REPOSITORY

https://github.com/michal-josef-spacek/Lego-Part-Image

AUTHOR

Michal Josef Špaček mailto:skim@cpan.org

http://skim.cz

LICENSE AND COPYRIGHT

© 2015-2023 Michal Josef Špaček

BSD 2-Clause License

VERSION

0.06