File Coverage

blib/lib/Mastodon/Entity/Card.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 20 20 100.0


line stmt bran cond sub pod time code
1             package Mastodon::Entity::Card;
2              
3 3     3   2844 use strict;
  3         8  
  3         426  
4 3     3   20 use warnings;
  3         6  
  3         129  
5              
6             our $VERSION = '0.017';
7              
8 3     3   18 use Moo;
  3         6  
  3         18  
9             with 'Mastodon::Role::Entity';
10              
11 3     3   1002 use Types::Standard qw( Any Str );
  3         7  
  3         22  
12 3     3   2895 use Mastodon::Types qw( URI );
  3         9  
  3         17  
13              
14             has description => ( is => 'ro', isa => Str, required => 1, );
15             has image => ( is => 'ro', isa => Any, ); # What type of data is this?
16             has title => ( is => 'ro', isa => Str, );
17             has url => ( is => 'ro', isa => URI, coerce => 1, required => 1, );
18              
19             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