File Coverage

blib/lib/Mastodon/Entity/Results.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::Results;
2              
3 2     2   4293 use strict;
  2         4  
  2         64  
4 2     2   11 use warnings;
  2         5  
  2         91  
5              
6             our $VERSION = '0.017';
7              
8 2     2   14 use Moo;
  2         4  
  2         11  
9             with 'Mastodon::Role::Entity';
10              
11 2     2   651 use Types::Standard qw( Str ArrayRef );
  2         5  
  2         14  
12 2     2   1465 use Mastodon::Types qw( Account Status );
  2         5  
  2         14  
13              
14             has accounts => ( is => 'ro', isa => ArrayRef [Account], );
15             has hashtags => ( is => 'ro', isa => ArrayRef [Str], required => 1, ); # Not Tag!
16             has statuses => ( is => 'ro', isa => ArrayRef [Status], );
17              
18             1;
19              
20             =encoding utf8
21              
22             =head1 NAME
23              
24             Mastodon::Entity::Results - A Mastodon search result
25              
26             =head1 DESCRIPTION
27              
28             This object should not be manually created. It is intended to be generated
29             from the data received from a Mastodon server using the coercions in
30             L<Mastodon::Types>.
31              
32             For current information, see the
33             L<Mastodon API documentation|https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md#results>
34              
35             =head1 ATTRIBUTES
36              
37             =over 4
38              
39             =item B<accounts>
40              
41             An array of matched L<Mastodon::Entity::Account> objects.
42              
43             =item B<statuses>
44              
45             An array of matchhed L<Mastodon::Entity::Status> objects.
46              
47             =item B<hashtags>
48              
49             An array of matched hashtags, as strings.
50              
51             =back
52              
53             =head1 AUTHOR
54              
55             =over 4
56              
57             =item *
58              
59             José Joaquín Atria <jjatria@cpan.org>
60              
61             =back
62              
63             =head1 COPYRIGHT AND LICENSE
64              
65             This software is copyright (c) 2017 by José Joaquín Atria.
66              
67             This is free software; you can redistribute it and/or modify it under
68             the same terms as the Perl 5 programming language system itself.
69              
70             =cut