File Coverage

blib/lib/WebService/TypePad/Object/Application.pm
Criterion Covered Total %
statement 12 72 16.6
branch 0 24 0.0
condition n/a
subroutine 4 16 25.0
pod 12 12 100.0
total 28 124 22.5


line stmt bran cond sub pod time code
1             package WebService::TypePad::Object::Application;
2 1     1   1355 use strict;
  1         2  
  1         37  
3 1     1   6 use warnings;
  1         3  
  1         27  
4 1     1   6 use WebService::TypePad::Util::Coerce;
  1         2  
  1         25  
5 1     1   4 use base qw(WebService::TypePad::Object::Entity);
  1         2  
  1         915  
6              
7             sub name {
8 0     0 1   my $self = shift;
9 0 0         if (@_) {
10 0           $self->{data}{name} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
11 0           return $_[0];
12             }
13             else {
14 0           return $self->{data}{name};
15             }
16             }
17              
18             sub object_types {
19 0     0 1   my $self = shift;
20 0 0         if (@_) {
21 0           $self->{data}{objectTypes} = WebService::TypePad::Util::Coerce::coerce_set_in($_[0], \&WebService::TypePad::Util::Coerce::coerce_string_in);
22 0           return $_[0];
23             }
24             else {
25 0           return WebService::TypePad::Util::Coerce::coerce_set_out($self->{data}{objectTypes});
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 oauth_request_token_url {
41 0     0 1   my $self = shift;
42 0 0         if (@_) {
43 0           $self->{data}{oauthRequestTokenUrl} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
44 0           return $_[0];
45             }
46             else {
47 0           return $self->{data}{oauthRequestTokenUrl};
48             }
49             }
50              
51             sub oauth_authorization_url {
52 0     0 1   my $self = shift;
53 0 0         if (@_) {
54 0           $self->{data}{oauthAuthorizationUrl} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
55 0           return $_[0];
56             }
57             else {
58 0           return $self->{data}{oauthAuthorizationUrl};
59             }
60             }
61              
62             sub oauth_access_token_url {
63 0     0 1   my $self = shift;
64 0 0         if (@_) {
65 0           $self->{data}{oauthAccessTokenUrl} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
66 0           return $_[0];
67             }
68             else {
69 0           return $self->{data}{oauthAccessTokenUrl};
70             }
71             }
72              
73             sub oauth_identification_url {
74 0     0 1   my $self = shift;
75 0 0         if (@_) {
76 0           $self->{data}{oauthIdentificationUrl} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
77 0           return $_[0];
78             }
79             else {
80 0           return $self->{data}{oauthIdentificationUrl};
81             }
82             }
83              
84             sub session_sync_script_url {
85 0     0 1   my $self = shift;
86 0 0         if (@_) {
87 0           $self->{data}{sessionSyncScriptUrl} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
88 0           return $_[0];
89             }
90             else {
91 0           return $self->{data}{sessionSyncScriptUrl};
92             }
93             }
94              
95             sub signout_url {
96 0     0 1   my $self = shift;
97 0 0         if (@_) {
98 0           $self->{data}{signoutUrl} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
99 0           return $_[0];
100             }
101             else {
102 0           return $self->{data}{signoutUrl};
103             }
104             }
105              
106             sub user_flyouts_script_url {
107 0     0 1   my $self = shift;
108 0 0         if (@_) {
109 0           $self->{data}{userFlyoutsScriptUrl} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
110 0           return $_[0];
111             }
112             else {
113 0           return $self->{data}{userFlyoutsScriptUrl};
114             }
115             }
116              
117             sub id {
118 0     0 1   my $self = shift;
119 0 0         if (@_) {
120 0           $self->{data}{id} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
121 0           return $_[0];
122             }
123             else {
124 0           return $self->{data}{id};
125             }
126             }
127              
128             sub url_id {
129 0     0 1   my $self = shift;
130 0 0         if (@_) {
131 0           $self->{data}{urlId} = WebService::TypePad::Util::Coerce::coerce_string_in($_[0]);
132 0           return $_[0];
133             }
134             else {
135 0           return $self->{data}{urlId};
136             }
137             }
138              
139             1;
140              
141             =head1 NAME
142              
143             WebService::TypePad::Object::Application - Perl representation of TypePad's Application object type
144              
145             =head1 SYNOPSIS
146              
147             use WebService::TypePad::Object::Application;
148             my $application = WebService::TypePad::Object::Application->new();
149              
150             =head1 DESCRIPTION
151              
152             This is a Perl representation of TypePad's Application object type.
153             For more information about this type and its parameters, see L.
154              
155             This is a subtype of L.
156              
157             =head1 PROPERTIES
158              
159             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.
160              
161             =head2 $application->id
162              
163             A URI that serves as a globally-unique id for the object. 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.
164              
165             Returns a single C value.
166              
167             =head2 $application->links
168              
169             B Hyperlinks for this application.
170              
171             Returns an array of L objects.
172              
173             =head2 $application->name
174              
175             The name of the application as provided by its developer.
176              
177             Returns a single C value.
178              
179             =head2 $application->oauth_access_token_url
180              
181             The URL of the OAuth access token endpoint for this application.
182              
183             Returns a single C value.
184              
185             =head2 $application->oauth_authorization_url
186              
187             The URL to send the user's browser to for the user authorization step.
188              
189             Returns a single C value.
190              
191             =head2 $application->oauth_identification_url
192              
193             The URL to send the user's browser to identify which user is logged in (the "signin" link).
194              
195             Returns a single C value.
196              
197             =head2 $application->oauth_request_token_url
198              
199             The URL of the OAuth request token endpoint for this application.
200              
201             Returns a single C value.
202              
203             =head2 $application->object_types
204              
205             The object types for this object. This set will contain the string C for an application object.
206              
207             Returns a set of C values.
208              
209             =head2 $application->session_sync_script_url
210              
211             The URL of the session sync script.
212              
213             Returns a single C value.
214              
215             =head2 $application->signout_url
216              
217             The URL to send the user's browser to in order to sign out of TypePad.
218              
219             Returns a single C value.
220              
221             =head2 $application->url_id
222              
223             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.
224              
225             Returns a single C value.
226              
227             =head2 $application->user_flyouts_script_url
228              
229             The URL of a script to embed to enable the user flyouts functionality.
230              
231             Returns a single C value.
232              
233             =head1 SEE ALSO
234              
235             =over 1
236              
237             =item * L
238              
239             =item * L
240              
241             =back