TypePad/Favorites.pm

filter: Statementstmt 60.7% 17 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 62.5% 5 / 8 Podpod 66.6% 2 / 3 totaltotal 61.5% 24 / 39 CC 1 SCAR 3.2
CC
1
Cov
61%
favorites
2.0
delete
2.0
get
2.0
CRAP 1.4
« TypePad/ImportJobs.pm ↑ Summary TypePad/ApiKeys.pm »
1 package WWW::TypePad::Favorites;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 # Install an accessor into WWW::TypePad to access an instance of this class
7 # bound to the WWW::TypePad instance.
8 0 ▶sub WWW::TypePad::favorites { __PACKAGE__->new( base => $_[0] ) }
Subroutine favorites: not called CC=1 SCAR=6.9
Pod undocumented
9  
10 ### BEGIN auto-generated
11 ### This is an automatically generated code, do not edit!
12 ### Scroll down to look for END to add additional methods
13  
14 =pod
15  
16 =head1 NAME
17  
18 WWW::TypePad::Favorites - Favorites API methods
19  
20 =head1 METHODS
21  
22 =cut
23  
24 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 1 ▶use Any::Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 1 extends 'WWW::TypePad::Noun';
27  
28 1 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
29  
30  
31 =pod
32  
33 =over 4
34  
35  
36 =item delete
37  
38 my $res = $tp->favorites->delete($id);
39  
40 Delete the selected favorite.
41  
42 Returns Favorite which contains following properties.
43  
44 =over 8
45  
46 =item id
47  
48 (string) A URI that serves as a globally unique identifier for the favorite.
49  
50 =item urlId
51  
52 (string) A string containing the canonical identifier that can be used to identify this favorite in URLs. This can be used to recognise where the same favorite is returned in response to different requests, and as a mapping key for an application's local data store.
53  
54 =item author
55  
56 (User) The user who saved this favorite. That is, this property is the user who saved the target asset as a favorite, not the creator of that asset.
57  
58 =item inReplyTo
59  
60 (AssetRef) A reference to the target asset that has been marked as a favorite.
61  
62 =item published
63  
64 (datetime) The time that the favorite was created, as a W3CDTF timestamp.
65  
66  
67 =back
68  
69 =cut
70  
71 0 ▶sub delete {
Subroutine delete: not called CC=1 SCAR=6.9
Pod documented
72 0 my $api = shift;
73 0 my @args;
74 0 push @args, shift; # id
75 0 my $uri = sprintf '/favorites/%s.json', @args;
76 0 $api->base->call("DELETE", $uri, @_);
77 }
78  
79  
80 =pod
81  
82  
83  
84 =item get
85  
86 my $res = $tp->favorites->get($id);
87  
88 Get basic information about the selected favorite, including its owner and the target asset.
89  
90 Returns Favorite which contains following properties.
91  
92 =over 8
93  
94 =item id
95  
96 (string) A URI that serves as a globally unique identifier for the favorite.
97  
98 =item urlId
99  
100 (string) A string containing the canonical identifier that can be used to identify this favorite in URLs. This can be used to recognise where the same favorite is returned in response to different requests, and as a mapping key for an application's local data store.
101  
102 =item author
103  
104 (User) The user who saved this favorite. That is, this property is the user who saved the target asset as a favorite, not the creator of that asset.
105  
106 =item inReplyTo
107  
108 (AssetRef) A reference to the target asset that has been marked as a favorite.
109  
110 =item published
111  
112 (datetime) The time that the favorite was created, as a W3CDTF timestamp.
113  
114  
115 =back
116  
117 =cut
118  
119 0 ▶sub get {
Subroutine get: not called CC=1 SCAR=6.9
Pod documented
120 0 my $api = shift;
121 0 my @args;
122 0 push @args, shift; # id
123 0 my $uri = sprintf '/favorites/%s.json', @args;
124 0 $api->base->call("GET", $uri, @_);
125 }
126  
127  
128 =pod
129  
130 =back
131  
132 =cut
133  
134 ### END auto-generated
135  
136 1 1;
« TypePad/ImportJobs.pm ↑ Summary TypePad/ApiKeys.pm »