File Coverage

blib/lib/WebService/TypePad/Object/UserProfile.pm
Criterion Covered Total %
statement 12 62 19.3
branch 0 20 0.0
condition n/a
subroutine 4 14 28.5
pod 10 10 100.0
total 26 106 24.5


line stmt bran cond sub pod time code
1             package WebService::TypePad::Object::UserProfile;
2 1     1   13434 use strict;
  1         3  
  1         72  
3 1     1   7 use warnings;
  1         2  
  1         33  
4 1     1   6 use WebService::TypePad::Util::Coerce;
  1         2  
  1         31  
5 1     1   5 use base qw(WebService::TypePad::Object::Base);
  1         1  
  1         842  
6              
7             sub display_name {
8 0     0 1   my $self = shift;
9 0 0         if (@_) {
10 0           $self->{data}{displayName} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
11 0           return $_[0];
12             }
13             else {
14 0           return $self->{data}{displayName};
15             }
16             }
17              
18             sub location {
19 0     0 1   my $self = shift;
20 0 0         if (@_) {
21 0           $self->{data}{location} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
22 0           return $_[0];
23             }
24             else {
25 0           return $self->{data}{location};
26             }
27             }
28              
29             sub interests {
30 0     0 1   my $self = shift;
31 0 0         if (@_) {
32 0           $self->{data}{interests} = WebService::TypePad::Util::Coerce::coerce_array_in($_[0], \&WebService::TypePad::Util::Coerce::coerce_string_in);
33 0           return $_[0];
34             }
35             else {
36 0           return WebService::TypePad::Util::Coerce::coerce_array_out($self->{data}{interests});
37             }
38             }
39              
40             sub preferred_username {
41 0     0 1   my $self = shift;
42 0 0         if (@_) {
43 0           $self->{data}{preferredUsername} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
44 0           return $_[0];
45             }
46             else {
47 0           return $self->{data}{preferredUsername};
48             }
49             }
50              
51             sub avatar_link {
52 0     0 1   my $self = shift;
53 0 0         if (@_) {
54 0           $self->{data}{avatarLink} = WebService::TypePad::Util::Coerce::coerce_ImageLink_in($_[0]);
55 0           return $_[0];
56             }
57             else {
58 0           return WebService::TypePad::Util::Coerce::coerce_ImageLink_out($self->{data}{avatarLink});
59             }
60             }
61              
62             sub profile_page_url {
63 0     0 1   my $self = shift;
64 0 0         if (@_) {
65 0           $self->{data}{profilePageUrl} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
66 0           return $_[0];
67             }
68             else {
69 0           return $self->{data}{profilePageUrl};
70             }
71             }
72              
73             sub follow_frame_content_url {
74 0     0 1   my $self = shift;
75 0 0         if (@_) {
76 0           $self->{data}{followFrameContentUrl} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
77 0           return $_[0];
78             }
79             else {
80 0           return $self->{data}{followFrameContentUrl};
81             }
82             }
83              
84             sub profile_edit_page_url {
85 0     0 1   my $self = shift;
86 0 0         if (@_) {
87 0           $self->{data}{profileEditPageUrl} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
88 0           return $_[0];
89             }
90             else {
91 0           return $self->{data}{profileEditPageUrl};
92             }
93             }
94              
95             sub membership_management_page_url {
96 0     0 1   my $self = shift;
97 0 0         if (@_) {
98 0           $self->{data}{membershipManagementPageUrl} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
99 0           return $_[0];
100             }
101             else {
102 0           return $self->{data}{membershipManagementPageUrl};
103             }
104             }
105              
106             sub homepage_url {
107 0     0 1   my $self = shift;
108 0 0         if (@_) {
109 0           $self->{data}{homepageUrl} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
110 0           return $_[0];
111             }
112             else {
113 0           return $self->{data}{homepageUrl};
114             }
115             }
116              
117             1;
118              
119             =head1 NAME
120              
121             WebService::TypePad::Object::UserProfile - Perl representation of TypePad's UserProfile object type
122              
123             =head1 SYNOPSIS
124              
125             use WebService::TypePad::Object::UserProfile;
126             my $user_profile = WebService::TypePad::Object::UserProfile->new();
127              
128             =head1 DESCRIPTION
129              
130             This is a Perl representation of TypePad's UserProfile object type.
131             For more information about this type and its parameters, see L.
132              
133             =head1 PROPERTIES
134              
135             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.
136              
137             =head2 $user_profile->avatar_link
138              
139             Link to this user's avatar (userpic) image.
140              
141             Returns a single L object.
142              
143             =head2 $user_profile->display_name
144              
145             The user's chosen display name.
146              
147             Returns a single C value.
148              
149             =head2 $user_profile->follow_frame_content_url
150              
151             URL of a page which can be rendered in an iframe to produce a widget through which the remote user can follow this user. Should be rendered in an iframe that's 300 pixels wide and 125 pixels high.
152              
153             Returns a single C value.
154              
155             =head2 $user_profile->homepage_url
156              
157             URL that the user has specified as an external website URL. C if the user has not provided a website URL.
158              
159             Returns a single C value.
160              
161             =head2 $user_profile->interests
162              
163             A list of interests provided by the user and displayed on the user's profile page.
164              
165             Returns an array of C values.
166              
167             =head2 $user_profile->location
168              
169             The location of the user, as a free-form string provided by the user.
170              
171             Returns a single C value.
172              
173             =head2 $user_profile->membership_management_page_url
174              
175             URL of a page at which this user can manage group memberships. This is present only if the remote user has access to do this.
176              
177             Returns a single C value.
178              
179             =head2 $user_profile->preferred_username
180              
181             The name the user has chosen for use in his TypePad Profile URL. This can be used as the id in the URL to select this user, though it must not be used as a persistent key since it can be changed by the user at any time.
182              
183             Returns a single C value.
184              
185             =head2 $user_profile->profile_edit_page_url
186              
187             URL of a page at which this user can edit the profile information attached to the user account. This is present only if the remote user has access to do this.
188              
189             Returns a single C value.
190              
191             =head2 $user_profile->profile_page_url
192              
193             URL of the user's profile page.
194              
195             Returns a single C value.
196              
197             =head1 SEE ALSO
198              
199             =over 1
200              
201             =item * L
202              
203             =back