File Coverage

blib/lib/Mastodon/Entity/Relationship.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1             package Mastodon::Entity::Relationship;
2              
3 3     3   6363 use strict;
  3         9  
  3         96  
4 3     3   25 use warnings;
  3         7  
  3         122  
5              
6             our $VERSION = '0.017';
7              
8 3     3   16 use Moo;
  3         6  
  3         16  
9             with 'Mastodon::Role::Entity';
10              
11 3     3   976 use Types::Standard qw( Int Bool );
  3         19  
  3         28  
12              
13             has id => ( is => 'ro', isa => Int, );
14             has blocking => ( is => 'ro', isa => Bool, coerce => 1, );
15             has followed_by => ( is => 'ro', isa => Bool, coerce => 1, );
16             has following => ( is => 'ro', isa => Bool, coerce => 1, );
17             has muting => ( is => 'ro', isa => Bool, coerce => 1, required => 1, );
18             has requested => ( is => 'ro', isa => Bool, coerce => 1, );
19              
20             1;
21              
22             =encoding utf8
23              
24             =head1 NAME
25              
26             Mastodon::Entity::Relationship - A Mastodon relationship
27              
28             =head1 DESCRIPTION
29              
30             This object should not be manually created. It is intended to be generated
31             from the data received from a Mastodon server using the coercions in
32             L<Mastodon::Types>.
33              
34             For current information, see the
35             L<Mastodon API documentation|https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md#relationship>
36              
37             =head1 ATTRIBUTES
38              
39             =over 4
40              
41             =item B<id>
42              
43             Target account id.
44              
45             =item B<following>
46              
47             Whether the user is currently following the account.
48              
49             =item B<followed_by>
50              
51             Whether the user is currently being followed by the account.
52              
53             =item B<blocking>
54              
55             Whether the user is currently blocking the account.
56              
57             =item B<muting>
58              
59             Whether the user is currently muting the account.
60              
61             =item B<requested>
62              
63             Whether the user has requested to follow the account.
64              
65             =back
66              
67             =head1 AUTHOR
68              
69             =over 4
70              
71             =item *
72              
73             José Joaquín Atria <jjatria@cpan.org>
74              
75             =back
76              
77             =head1 COPYRIGHT AND LICENSE
78              
79             This software is copyright (c) 2017 by José Joaquín Atria.
80              
81             This is free software; you can redistribute it and/or modify it under
82             the same terms as the Perl 5 programming language system itself.
83              
84             =cut