Entity/Notification.pm

filter: Statementstmt 100% 23 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 28 / 28 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Entity/Mention.pm ↑ Summary Entity/Relationship.pm »
1 package Mastodon::Entity::Notification;
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 Enum );
Subroutine BEGIN: called CC=1 SCAR=0.0
12 3 ▶use Mastodon::Types qw( Status DateTime Account );
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 3 has account => ( is => 'ro', isa => Account, );
15 3 has created_at => ( is => 'ro', isa => DateTime, );
16 3 has id => ( is => 'ro', isa => Int, );
17 3 has status => ( is => 'ro', isa => Status, required => 1, coerce => 1, );
18 3 has type => ( is => 'ro', isa => Enum[qw(
19 mention reblog favourite follow
20 )], );
21  
22 3 1;
23  
24 =encoding utf8
25  
26 =head1 NAME
27  
28 Mastodon::Entity::Notification - A Mastodon notification
29  
30 =head1 DESCRIPTION
31  
32 This object should not be manually created. It is intended to be generated
33 from the data received from a Mastodon server using the coercions in
34 L<Mastodon::Types>.
35  
36 For current information, see the
37 L<Mastodon API documentation|https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md#notification>
38  
39 =head1 ATTRIBUTES
40  
41 =over 4
42  
43 =item B<id>
44  
45 The notification ID.
46  
47 =item B<type>
48  
49 One of: "mention", "reblog", "favourite", "follow".
50  
51 =item B<created_at>
52  
53 The time the notification was created.
54  
55 =item B<account>
56  
57 The Account sending the notification to the user as a
58 L<Mastodon::Entity::Account> object.
59  
60 =item B<status>
61  
62 The Status associated with the notification, if applicable. As a
63 L<Mastodon::Entity::Status> object.
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
« Entity/Mention.pm ↑ Summary Entity/Relationship.pm »