Entity/Card.pm

filter: Statementstmt 100% 22 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 27 / 27 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Entity/Attachment.pm ↑ Summary Entity/Context.pm »
1 package Mastodon::Entity::Card;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 our $VERSION = '0.018'; # TRIAL
7  
8 3 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 3 with 'Mastodon::Role::Entity';
10  
11 3 ▶use Types::Standard qw( Any Str );
Subroutine BEGIN: called CC=1 SCAR=0.0
12 3 ▶use Mastodon::Types qw( URI );
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 3 has description => ( is => 'ro', isa => Str, required => 1, );
15 3 has image => ( is => 'ro', isa => Any, ); # What type of data is this?
16 3 has title => ( is => 'ro', isa => Str, );
17 3 has url => ( is => 'ro', isa => URI, coerce => 1, required => 1, );
18  
19 3 1;
20  
21 =encoding utf8
22  
23 =head1 NAME
24  
25 Mastodon::Entity::Card - A Mastodon card
26  
27 =head1 DESCRIPTION
28  
29 This object should not be manually created. It is intended to be generated
30 from the data received from a Mastodon server using the coercions in
31 L<Mastodon::Types>.
32  
33 For current information, see the
34 L<Mastodon API documentation|https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md#card>
35  
36 =head1 ATTRIBUTES
37  
38 =over 4
39  
40 =item B<url>
41  
42 The url associated with the card.
43  
44 =item B<title>
45  
46 The title of the card.
47  
48 =item B<description>
49  
50 The card description.
51  
52 =item B<image>
53  
54 The image associated with the card, if any.
55  
56 =back
57  
58 =head1 AUTHOR
59  
60 =over 4
61  
62 =item *
63  
64 José Joaquín Atria <jjatria@cpan.org>
65  
66 =back
67  
68 =head1 COPYRIGHT AND LICENSE
69  
70 This software is copyright (c) 2017 by José Joaquín Atria.
71  
72 This is free software; you can redistribute it and/or modify it under
73 the same terms as the Perl 5 programming language system itself.
74  
75 =cut
« Entity/Attachment.pm ↑ Summary Entity/Context.pm »