NAME
Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::Dog - Test instance for Wikidata item.
SYNOPSIS
use Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::Dog;
my $obj = Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::Dog->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::Dog->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.
sitelinks
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::Dog;
use Unicode::UTF8 qw(encode_utf8);
use Wikibase::Datatype::Print::Item;
# Object.
my $obj = Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::Dog->new;
# Print out.
print encode_utf8(scalar Wikibase::Datatype::Print::Item::print($obj));
# Output:
# Label: dog (en)
# Description: domestic animal (en)
# Aliases:
# domestic dog (en)
# Canis lupus familiaris (en)
# Canis familiaris (en)
# dogs (en)
# 🐶 (en)
# 🐕 (en)
# Sitelinks:
# Dog (enwiki)
# Statements:
# P31: Q55983715 (normal)
# P642: Q20717272
# P642: Q26972265
DEPENDENCIES
Test::Shared::Fixture::Wikibase::Datatype::Statement::Wikidata::InstanceOf::CommonLivingOrganism, Unicode::UTF8, Wikibase::Datatype::Sitelink, Wikibase::Datatype::Statement, Wikibase::Datatype::Snak, Wikibase::Datatype::Value::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
LICENSE AND COPYRIGHT
© 2020-2023 Michal Josef Špaček
BSD 2-Clause License
VERSION
0.33