NAME

Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::DouglasAdams - Test instance for Wikidata item.

SYNOPSIS

use Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::DouglasAdams;

my $obj = Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::DouglasAdams->new;
my $aliases_ar = $obj->aliases;
my $descriptions_ar = $obj->descriptions;
my $id = $obj->id;
my $labels_ar = $obj->labels;
my $lastrevid = $obj->lastrevid;
my $modified = $obj->modified;
my $ns = $obj->ns;
my $page_id = $obj->page_id;
my $sitelinks_ar = $obj->sitelinks;
my $statements_ar = $obj->statements;
my $title = $obj->title;

METHODS

new

my $obj = Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::DouglasAdams->new;

Constructor.

Returns instance of object.

aliases

my $aliases_ar = $obj->aliases;

Get aliases.

Returns reference to array with Wikibase::Datatype::Value::Monolingual instances.

descriptions

my $descriptions_ar = $obj->descriptions;

Get descriptions.

Returns reference to array with Wikibase::Datatype::Value::Monolingual instances.

id

my $id = $obj->id;

Get id.

Returns string.

labels

my $labels_ar = $obj->labels;

Get labels.

Returns reference to array with Wikibase::Datatype::Value::Monolingual instances.

lastrevid

my $lastrevid = $obj->lastrevid;

Get last revision ID.

Returns string.

modified

my $modified = $obj->modified;

Get date of modification.

Returns string.

ns

my $ns = $obj->ns;

Get namespace.

Returns number.

page_id

my $page_id = $obj->page_id;

Get page id.

Returns number.

my $sitelinks_ar = $obj->sitelinks;

Get sitelinks.

Returns reference to array with Wikibase::Datatype::Sitelink instances.

statements

my $statements_ar = $obj->statements;

Get statements.

Returns reference to array with Wikibase::Datatype::Statement instances.

title

my $title = $obj->title;

Get title.

Returns string.

EXAMPLE

use strict;
use warnings;

use Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::DouglasAdams;
use Wikibase::Datatype::Print::Item;

# Object.
my $obj = Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::DouglasAdams->new;

# Print out.
print scalar Wikibase::Datatype::Print::Item::print($obj);

# Output:
# Label: Douglas Adams (en)
# Description: English writer and humorist (1952-2001) (en)
# Aliases:
#   Douglas Noel Adams (en)
# Statements:
#   P31: Q5 (normal)
#   References:
#     {
#       P248: Q53919
#       P214: 113230702
#       P813: 7 December 2013 (Q1985727)
#     }
#   P21: Q6581097 (normal)
#   References:
#     {
#       P854: https://skim.cz
#       P813: 7 December 2013 (Q1985727)
#     }
#     {
#       P248: Q53919
#       P214: 113230702
#       P813: 7 December 2013 (Q1985727)
#     }
#   P735: Q463035 (normal)

DEPENDENCIES

Test::Shared::Fixture::Wikibase::Datatype::Statement::Wikidata::GivenName::Douglas, Test::Shared::Fixture::Wikibase::Datatype::Statement::Wikidata::InstanceOf::Human, Test::Shared::Fixture::Wikibase::Datatype::Statement::Wikidata::SexOrGender::Male, Wikibase::Datatype::Item, Wikibase::Datatype::Value::Monolingual.

SEE ALSO

Wikibase::Datatype

Wikibase datatypes.

Wikibase::Datatype::Item

Wikibase item datatype.

REPOSITORY

https://github.com/michal-josef-spacek/Wikibase-Datatype

AUTHOR

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

http://skim.cz

LICENSE AND COPYRIGHT

© 2020-2023 Michal Josef Špaček

BSD 2-Clause License

VERSION

0.33