| 1 | package Mastodon::Entity::Relationship; | ||
| 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( Int Bool ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | 3 | has id => ( is => 'ro', isa => Int, ); | |
| 14 | 3 | has blocking => ( is => 'ro', isa => Bool, coerce => 1, ); | |
| 15 | 3 | has followed_by => ( is => 'ro', isa => Bool, coerce => 1, ); | |
| 16 | 3 | has following => ( is => 'ro', isa => Bool, coerce => 1, ); | |
| 17 | 3 | has muting => ( is => 'ro', isa => Bool, coerce => 1, required => 1, ); | |
| 18 | 3 | has requested => ( is => 'ro', isa => Bool, coerce => 1, ); | |
| 19 | |||
| 20 | 3 | 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 | ||