TypePad/Domains.pm untested

filter: Statementstmt 0.0% 0 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 38 CC 1 SCAR 6.9
CC
1
Cov
0%
WWW::TypePad::domains
2.0
get
2.0
resolve_path
2.0
CRAP 2.0
1 package WWW::TypePad::Domains;
2  
3 use strict;
4 use warnings;
5  
6 # Install an accessor into WWW::TypePad to access an instance of this class
7 # bound to the WWW::TypePad instance.
8 sub WWW::TypePad::domains { __PACKAGE__->new( base => $_[0] ) }
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::Domains - Domains API methods
19  
20 =head1 METHODS
21  
22 =cut
23  
24 use strict;
25 use Any::Moose;
26 extends 'WWW::TypePad::Noun';
27  
28 use Carp ();
29  
30  
31 =pod
32  
33 =over 4
34  
35  
36 =item get
37  
38 my $res = $tp->domains->get($id);
39  
40 Get basic information about the selected domain.
41  
42 Returns Domain which contains following properties.
43  
44 =over 8
45  
46 =item domain
47  
48 (string) The domain that this object describes.
49  
50 =item owner
51  
52 (User) The user that owns this domain in TypePad.
53  
54  
55 =back
56  
57 =cut
58  
59 sub get {
60 my $api = shift;
61 my @args;
62 push @args, shift; # id
63 my $uri = sprintf '/domains/%s.json', @args;
64 $api->base->call("GET", $uri, @_);
65 }
66  
67  
68 =pod
69  
70  
71  
72 =item resolve_path
73  
74 my $res = $tp->domains->resolve_path($id);
75  
76 Given a URI path, find the blog and asset, if any, that the path matches.
77  
78 Returns hash reference which contains following properties.
79  
80 =over 8
81  
82 =item blog
83  
84 (Blog) The blog that the given URL belongs to, if any.
85  
86 =item asset
87  
88 (Asset) The asset that the given URL is for, if any.
89  
90 =item isFullMatch
91  
92 (boolean) CE<lt>trueE<gt> if the given path matched a blog or asset directly, or CE<lt>falseE<gt> if this is only a prefix match. If using this endpoint to implement an alternative blog renderer, a client should return 404 if this flag is not set.
93  
94  
95 =back
96  
97 =cut
98  
99 sub resolve_path {
100 my $api = shift;
101 my @args;
102 push @args, shift; # id
103 my $uri = sprintf '/domains/%s/resolve-path.json', @args;
104 $api->base->call("POST", $uri, @_);
105 }
106  
107  
108 =pod
109  
110 =back
111  
112 =cut
113  
114 ### END auto-generated
115  
116 1;