File Coverage

blib/lib/WebService/TypePad/Object/Event.pm
Criterion Covered Total %
statement 12 42 28.5
branch 0 12 0.0
condition n/a
subroutine 4 10 40.0
pod 6 6 100.0
total 22 70 31.4


line stmt bran cond sub pod time code
1             package WebService::TypePad::Object::Event;
2 1     1   13338 use strict;
  1         7  
  1         69  
3 1     1   5 use warnings;
  1         3  
  1         30  
4 1     1   6 use WebService::TypePad::Util::Coerce;
  1         2  
  1         34  
5 1     1   6 use base qw(WebService::TypePad::Object::Base);
  1         3  
  1         618  
6              
7             sub id {
8 0     0 1   my $self = shift;
9 0 0         if (@_) {
10 0           $self->{data}{id} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
11 0           return $_[0];
12             }
13             else {
14 0           return $self->{data}{id};
15             }
16             }
17              
18             sub url_id {
19 0     0 1   my $self = shift;
20 0 0         if (@_) {
21 0           $self->{data}{urlId} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
22 0           return $_[0];
23             }
24             else {
25 0           return $self->{data}{urlId};
26             }
27             }
28              
29             sub links {
30 0     0 1   my $self = shift;
31 0 0         if (@_) {
32 0           $self->{data}{links} = WebService::TypePad::Util::Coerce::coerce_list_in($_[0], \&WebService::TypePad::Util::Coerce::coerce_LegacyHyperlink_in);
33 0           return $_[0];
34             }
35             else {
36 0           return WebService::TypePad::Util::Coerce::coerce_array_out($self->{data}{links}, \&WebService::TypePad::Util::Coerce::coerce_LegacyHyperlink_out);
37             }
38             }
39              
40             sub verbs {
41 0     0 1   my $self = shift;
42 0 0         if (@_) {
43 0           $self->{data}{verbs} = WebService::TypePad::Util::Coerce::coerce_set_in($_[0], \&WebService::TypePad::Util::Coerce::coerce_string_in);
44 0           return $_[0];
45             }
46             else {
47 0           return WebService::TypePad::Util::Coerce::coerce_set_out($self->{data}{verbs});
48             }
49             }
50              
51             sub actor {
52 0     0 1   my $self = shift;
53 0 0         if (@_) {
54 0           $self->{data}{actor} = WebService::TypePad::Util::Coerce::coerce_User_in($_[0]);
55 0           return $_[0];
56             }
57             else {
58 0           return WebService::TypePad::Util::Coerce::coerce_User_out($self->{data}{actor});
59             }
60             }
61              
62             sub object {
63 0     0 1   my $self = shift;
64 0 0         if (@_) {
65 0           $self->{data}{object} = WebService::TypePad::Util::Coerce::coerce_Base_in($_[0]);
66 0           return $_[0];
67             }
68             else {
69 0           return WebService::TypePad::Util::Coerce::coerce_Base_out($self->{data}{object});
70             }
71             }
72              
73             1;
74              
75             =head1 NAME
76              
77             WebService::TypePad::Object::Event - Perl representation of TypePad's Event object type
78              
79             =head1 SYNOPSIS
80              
81             use WebService::TypePad::Object::Event;
82             my $event = WebService::TypePad::Object::Event->new();
83              
84             =head1 DESCRIPTION
85              
86             This is a Perl representation of TypePad's Event object type.
87             For more information about this type and its parameters, see L.
88              
89             =head1 PROPERTIES
90              
91             Each of these properties has an accessor method which will retrieve the property's value when called with no arguments or set the property's value when called with one argument.
92              
93             =head2 $event->actor
94              
95             The user that did the action that the event describes.
96              
97             Returns a single L object.
98              
99             =head2 $event->id
100              
101             A URI that serves as a globally-unique id for the user. This can be used to recognise where the same user is returned in response to different requests, and as a mapping key for an application's local data store.
102              
103             Returns a single C value.
104              
105             =head2 $event->links
106              
107             The hyperlinks for the user object. The "alternate" hyperlink of type "text/html" points at the user's TypePad profile page.
108              
109             Returns an array of L objects.
110              
111             =head2 $event->object
112              
113             The object that the action was done to.
114              
115             Returns a single L object.
116              
117             =head2 $event->url_id
118              
119             A string containing the canonical identifier that can be used as the "id" for this object in URLs. However, this should not be used as a database key to avoid collisions when an application is switched to a different backend server; use the "id" property instead.
120              
121             Returns a single C value.
122              
123             =head2 $event->verbs
124              
125             An array of verb identifier URIs. At the present time, only one verb is returned, but this may be extended in future. Clients should scan this list and ignore any verbs that are not recognised. This list also includes appropriate verb URIs as defined by the ActivityStrea.ms schema specification.
126              
127             Returns a set of C values.
128              
129             =head1 SEE ALSO
130              
131             =over 1
132              
133             =item * L
134              
135             =item * L
136              
137             =back