« blib/lib/WWW/GoDaddy/REST/Shell/DocsCommand.pm
↑ Summary
blib/lib/WWW/GoDaddy/REST/Shell/Util.pm »
| 1 | package WWW::GoDaddy::REST::Schema; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||
| 3 | 4 | ▶ | use Moose; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 4 | ▶ | use WWW::GoDaddy::REST::Util qw( abs_url build_complex_query_url ); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||
| 6 | 4 | extends 'WWW::GoDaddy::REST::Resource'; | |||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||
| 8 | sub resource_field_names { | ||||||||||||||||||||||||||||||||||||||||||
| 9 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
resource_field_names: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 10 | 0 | my %res_fields = %{ $self->f('resourceFields') }; | |||||||||||||||||||||||||||||||||||||||||
| 11 | 0 | return keys %res_fields; | |||||||||||||||||||||||||||||||||||||||||
| 12 | } | ||||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||||
| 14 | sub resource_field { | ||||||||||||||||||||||||||||||||||||||||||
| 15 | 5 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
resource_field: called CC=2 SCAR=7.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 16 | 5 | my $name = shift; | |||||||||||||||||||||||||||||||||||||||||
| 17 | 5 | my $res_fields = $self->f('resourceFields'); | |||||||||||||||||||||||||||||||||||||||||
| 18 | 5 | ▶ | if ( !exists $res_fields->{$name} ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 19 | 0 | return undef; | |||||||||||||||||||||||||||||||||||||||||
| 20 | } | ||||||||||||||||||||||||||||||||||||||||||
| 21 | 5 | return $res_fields->{$name}; | |||||||||||||||||||||||||||||||||||||||||
| 22 | } | ||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||
| 24 | sub resource_field_type { | ||||||||||||||||||||||||||||||||||||||||||
| 25 | 5 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
resource_field_type: called CC=18 SCAR=45.3
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 26 | 5 | my $name = shift; | |||||||||||||||||||||||||||||||||||||||||
| 27 | 5 | ▶ | my $opts = shift || {}; | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
shift() || {}
MC/DC0%0/1
shift() || {}
shift()
Truth table50%1/2
A
A= shift()
| |||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||
| 29 | 5 | ▶ | my $type = $self->resource_field($name)->{'type'} || 'string'; | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$self->resource_field($name)->{'type'} || 'string'
MC/DC0%0/1
$self->resource_field($name)->{'type'} || 'string'
$self->resource_field($name)->{'type'}
Truth table50%1/2
A
A= $self->resource_field($name)->{'type'}
| |||||||||||||||||||||||||||||||||||||||||||
| 30 | 5 | my $want_array = wantarray; | |||||||||||||||||||||||||||||||||||||||||
| 31 | 5 | my $auto_upconvert_reference = $opts->{auto_upconvert_reference}; | |||||||||||||||||||||||||||||||||||||||||
| 32 | 5 | my $qualify_schema_types = $opts->{qualify_schema_types}; | |||||||||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||||||||||
| 34 | 5 | ▶ | if ( $want_array or $auto_upconvert_reference or $qualify_schema_types ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
$want_array or $auto_upconvert_reference or $qualify_schema_types
$want_array or $auto_upconvert_reference
MC/DC0%0/3
$want_array or $auto_upconvert_reference or $qualify_schema_types
$want_array
$auto_upconvert_reference
$qualify_schema_types
Truth table25%1/4
A or B or C
A= $want_arrayB= $auto_upconvert_referenceC= $qualify_schema_types
| |||||||||||||||||||||||||||||||||||||||||||
| 35 | 5 | my ( $a_type, $b_type ) = split( /[\[\]]/, $type ); | |||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||
| 37 | 5 | ▶ | my $compound_type = $b_type ? 1 : 0; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||||
| 39 | 5 | ▶ | if ($auto_upconvert_reference) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||||||||||||
| 41 | # some schemas don't properly use the 'reference' type to indicate | ||||||||||||||||||||||||||||||||||||||||||
| 42 | # the complex relationship. Convention seems to favor two sorts | ||||||||||||||||||||||||||||||||||||||||||
| 43 | # of field names that link to complex types: | ||||||||||||||||||||||||||||||||||||||||||
| 44 | # mySchemaId | ||||||||||||||||||||||||||||||||||||||||||
| 45 | # my_schema_id | ||||||||||||||||||||||||||||||||||||||||||
| 46 | 0 | ▶ | if ( !$compound_type && $name =~ /^(.*)(_id|Id)$/ ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
not $compound_type and $name =~ /^(.*)(_id|Id)$/
MC/DC0%0/2
not $compound_type and $name =~ /^(.*)(_id|Id)$/
not $compound_type
$name =~ /^(.*)(_id|Id)$/
Truth table0%0/3
not(A) and B
A= not $compound_typeB= $name =~ /^(.*)(_id|Id)$/
| |||||||||||||||||||||||||||||||||||||||||||
| 47 | 0 | my $possible_schema = $self->client->schema($1); | |||||||||||||||||||||||||||||||||||||||||
| 48 | 0 | ▶ | if ($possible_schema) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 49 | 0 | $compound_type = 1; | |||||||||||||||||||||||||||||||||||||||||
| 50 | 0 | $a_type = 'reference'; | |||||||||||||||||||||||||||||||||||||||||
| 51 | 0 | $b_type = $possible_schema->id; | |||||||||||||||||||||||||||||||||||||||||
| 52 | } | ||||||||||||||||||||||||||||||||||||||||||
| 53 | } | ||||||||||||||||||||||||||||||||||||||||||
| 54 | } | ||||||||||||||||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||||||||||||||||
| 56 | 5 | ▶ | if ($qualify_schema_types) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 57 | 0 | ▶ | if ($compound_type) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 58 | 0 | my $possible_schema = $self->client->schema($b_type); | |||||||||||||||||||||||||||||||||||||||||
| 59 | 0 | ▶ | if ($possible_schema) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 60 | 0 | $b_type = $possible_schema->link('self'); | |||||||||||||||||||||||||||||||||||||||||
| 61 | } | ||||||||||||||||||||||||||||||||||||||||||
| 62 | } | ||||||||||||||||||||||||||||||||||||||||||
| 63 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 64 | 0 | my $possible_schema = $self->client->schema($a_type); | |||||||||||||||||||||||||||||||||||||||||
| 65 | 0 | ▶ | if ($possible_schema) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 66 | 0 | $a_type = $possible_schema->link('self'); | |||||||||||||||||||||||||||||||||||||||||
| 67 | } | ||||||||||||||||||||||||||||||||||||||||||
| 68 | } | ||||||||||||||||||||||||||||||||||||||||||
| 69 | } | ||||||||||||||||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||||||||||||||||
| 71 | 5 | ▶ | if ($want_array) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 72 | 5 | ▶ | if ($compound_type) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 73 | 4 | return ( $a_type, $b_type ); | |||||||||||||||||||||||||||||||||||||||||
| 74 | } | ||||||||||||||||||||||||||||||||||||||||||
| 75 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 76 | 1 | return ( undef, $a_type ); | |||||||||||||||||||||||||||||||||||||||||
| 77 | } | ||||||||||||||||||||||||||||||||||||||||||
| 78 | } | ||||||||||||||||||||||||||||||||||||||||||
| 79 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 80 | 0 | ▶ | if ($compound_type) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 81 | 0 | $type = sprintf( '%s[%s]', $a_type, $b_type ); | |||||||||||||||||||||||||||||||||||||||||
| 82 | } | ||||||||||||||||||||||||||||||||||||||||||
| 83 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 84 | 0 | $type = $a_type; | |||||||||||||||||||||||||||||||||||||||||
| 85 | } | ||||||||||||||||||||||||||||||||||||||||||
| 86 | } | ||||||||||||||||||||||||||||||||||||||||||
| 87 | } | ||||||||||||||||||||||||||||||||||||||||||
| 88 | 0 | return $type; | |||||||||||||||||||||||||||||||||||||||||
| 89 | } | ||||||||||||||||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||||||||||||||||
| 91 | sub query { | ||||||||||||||||||||||||||||||||||||||||||
| 92 | 2 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
query: called CC=3 SCAR=13.3
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||||||||||||||||
| 94 | 2 | ▶ | if ( @_ == 1 && !ref( $_[0] ) ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
@_ == 1 and not ref $_[0]
MC/DC0%0/2
@_ == 1 and not ref $_[0]
@_ == 1
not ref $_[0]
Truth table33%1/3
A and not(B)
A= @_ == 1B= not ref $_[0]
| |||||||||||||||||||||||||||||||||||||||||||
| 95 | 0 | return $self->query_by_id(@_); | |||||||||||||||||||||||||||||||||||||||||
| 96 | } | ||||||||||||||||||||||||||||||||||||||||||
| 97 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 98 | 2 | return $self->query_complex(@_); | |||||||||||||||||||||||||||||||||||||||||
| 99 | } | ||||||||||||||||||||||||||||||||||||||||||
| 100 | |||||||||||||||||||||||||||||||||||||||||||
| 101 | } | ||||||||||||||||||||||||||||||||||||||||||
| 102 | |||||||||||||||||||||||||||||||||||||||||||
| 103 | sub query_complex { | ||||||||||||||||||||||||||||||||||||||||||
| 104 | 2 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
query_complex: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 105 | |||||||||||||||||||||||||||||||||||||||||||
| 106 | 2 | my $url = build_complex_query_url( $self->query_url, @_ ); | |||||||||||||||||||||||||||||||||||||||||
| 107 | |||||||||||||||||||||||||||||||||||||||||||
| 108 | 2 | my $resource = $self->client->http_request_as_resource( 'GET', $url ); | |||||||||||||||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||||||||||||||||
| 110 | 2 | ▶ | return wantarray ? $resource->items() : $resource; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 111 | } | ||||||||||||||||||||||||||||||||||||||||||
| 112 | |||||||||||||||||||||||||||||||||||||||||||
| 113 | sub query_by_id { | ||||||||||||||||||||||||||||||||||||||||||
| 114 | 5 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
query_by_id: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 115 | 5 | my $id = shift; | |||||||||||||||||||||||||||||||||||||||||
| 116 | |||||||||||||||||||||||||||||||||||||||||||
| 117 | 5 | my $client = $self->client; | |||||||||||||||||||||||||||||||||||||||||
| 118 | 5 | my $url = $self->query_url($id); | |||||||||||||||||||||||||||||||||||||||||
| 119 | |||||||||||||||||||||||||||||||||||||||||||
| 120 | 5 | return $client->http_request_as_resource( 'GET', $url ); | |||||||||||||||||||||||||||||||||||||||||
| 121 | } | ||||||||||||||||||||||||||||||||||||||||||
| 122 | |||||||||||||||||||||||||||||||||||||||||||
| 123 | sub create { | ||||||||||||||||||||||||||||||||||||||||||
| 124 | 3 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
create: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 125 | |||||||||||||||||||||||||||||||||||||||||||
| 126 | 3 | my $client = $self->client; | |||||||||||||||||||||||||||||||||||||||||
| 127 | 3 | my $url = $self->query_url; | |||||||||||||||||||||||||||||||||||||||||
| 128 | |||||||||||||||||||||||||||||||||||||||||||
| 129 | 3 | return $client->http_request_as_resource( 'POST', $url, @_ ); | |||||||||||||||||||||||||||||||||||||||||
| 130 | } | ||||||||||||||||||||||||||||||||||||||||||
| 131 | |||||||||||||||||||||||||||||||||||||||||||
| 132 | sub is_queryable { | ||||||||||||||||||||||||||||||||||||||||||
| 133 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
is_queryable: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 134 | 0 | ▶ | if ( $self->id eq 'schema' ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 135 | 0 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 136 | } | ||||||||||||||||||||||||||||||||||||||||||
| 137 | 0 | ▶ | if ( $self->link('collection') ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 138 | 0 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 139 | } | ||||||||||||||||||||||||||||||||||||||||||
| 140 | } | ||||||||||||||||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||||||||||||||||
| 142 | sub query_url { | ||||||||||||||||||||||||||||||||||||||||||
| 143 | 10 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
query_url: called CC=4 SCAR=14.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 144 | 10 | my ($id) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||||||||||||||||||||
| 146 | 10 | ▶ | my $base_url = $self->id eq 'schema' ? $self->link('schemas') : $self->link('collection'); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 147 | 10 | ▶ | if ( !defined $base_url ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 148 | 0 | die( "Unable to build a query url: schema '" . $self->id . "' has no 'collection' link" ); | |||||||||||||||||||||||||||||||||||||||||
| 149 | } | ||||||||||||||||||||||||||||||||||||||||||
| 150 | 10 | ▶ | if ( defined $id ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 151 | 5 | return abs_url( $base_url, $id ); | |||||||||||||||||||||||||||||||||||||||||
| 152 | } | ||||||||||||||||||||||||||||||||||||||||||
| 153 | 5 | return $base_url; | |||||||||||||||||||||||||||||||||||||||||
| 154 | } | ||||||||||||||||||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||||||||||||||||
| 156 | 4 | our %REGISTRY; | |||||||||||||||||||||||||||||||||||||||||
| 157 | |||||||||||||||||||||||||||||||||||||||||||
| 158 | sub registry_add { | ||||||||||||||||||||||||||||||||||||||||||
| 159 | 72 | ▶ | my $class = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
registry_add: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 160 | 72 | my %schemas = @_; | |||||||||||||||||||||||||||||||||||||||||
| 161 | 72 | ▶ | while ( my ( $key, $object ) = each(%schemas) ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 162 | 72 | $REGISTRY{$key} = $object; | |||||||||||||||||||||||||||||||||||||||||
| 163 | } | ||||||||||||||||||||||||||||||||||||||||||
| 164 | } | ||||||||||||||||||||||||||||||||||||||||||
| 165 | |||||||||||||||||||||||||||||||||||||||||||
| 166 | sub registry_lookup { | ||||||||||||||||||||||||||||||||||||||||||
| 167 | 20 | ▶ | my $class = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
registry_lookup: called CC=6 SCAR=18.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 168 | 20 | my @possibles = @_; | |||||||||||||||||||||||||||||||||||||||||
| 169 | 20 | foreach my $find (@possibles) { | |||||||||||||||||||||||||||||||||||||||||
| 170 | 20 | ▶ | if ( exists $REGISTRY{$find} and defined $REGISTRY{$find} ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
exists $WWW::GoDaddy::REST::Schema::REGISTRY{$find} and defined $WWW::GoDaddy::REST::Schema::REGISTRY{$find}
MC/DC50%1/2
exists $WWW::GoDaddy::REST::Schema::REGISTRY{$find} and defined $WWW::GoDaddy::REST::Schema::REGISTRY{$find}
exists $WWW::GoDaddy::REST::Schema::REGISTRY{$find}
defined $WWW::GoDaddy::REST::Schema::REGISTRY{$find}
Truth table66%2/3
A and B
A= exists $WWW::GoDaddy::REST::Schema::REGISTRY{$find}B= defined $WWW::GoDaddy::REST::Schema::REGISTRY{$find}
| |||||||||||||||||||||||||||||||||||||||||||
| 171 | 19 | return $REGISTRY{$find}; | |||||||||||||||||||||||||||||||||||||||||
| 172 | } | ||||||||||||||||||||||||||||||||||||||||||
| 173 | 1 | ▶ | while ( my ( $key, $schema ) = each %REGISTRY ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 174 | 18 | ▶ | if ( lc($find) eq lc($key) ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 175 | 0 | return $schema; | |||||||||||||||||||||||||||||||||||||||||
| 176 | } | ||||||||||||||||||||||||||||||||||||||||||
| 177 | } | ||||||||||||||||||||||||||||||||||||||||||
| 178 | } | ||||||||||||||||||||||||||||||||||||||||||
| 179 | 1 | return; | |||||||||||||||||||||||||||||||||||||||||
| 180 | |||||||||||||||||||||||||||||||||||||||||||
| 181 | } | ||||||||||||||||||||||||||||||||||||||||||
| 182 | |||||||||||||||||||||||||||||||||||||||||||
| 183 | sub registry_list { | ||||||||||||||||||||||||||||||||||||||||||
| 184 | 4 | ▶ | my $class = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
registry_list: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 185 | 4 | my %seen; | |||||||||||||||||||||||||||||||||||||||||
| 186 | 4 | return grep { not $seen{ $_->id }++ } values %REGISTRY; | |||||||||||||||||||||||||||||||||||||||||
| 187 | } | ||||||||||||||||||||||||||||||||||||||||||
| 188 | |||||||||||||||||||||||||||||||||||||||||||
| 189 | 4 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 190 | |||||||||||||||||||||||||||||||||||||||||||
| 191 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||||||||||||||||
| 193 | WWW::GoDaddy::REST::Schema - schema specific resource class | ||||||||||||||||||||||||||||||||||||||||||
| 194 | |||||||||||||||||||||||||||||||||||||||||||
| 195 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||||||||||||||||
| 196 | |||||||||||||||||||||||||||||||||||||||||||
| 197 | $schema = $client->schema('the_name'); | ||||||||||||||||||||||||||||||||||||||||||
| 198 | $scehama = $resource->schema(); | ||||||||||||||||||||||||||||||||||||||||||
| 199 | |||||||||||||||||||||||||||||||||||||||||||
| 200 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||||||||||||||||
| 201 | |||||||||||||||||||||||||||||||||||||||||||
| 202 | This is used to represent a 'schema' which is a very common resource in the | ||||||||||||||||||||||||||||||||||||||||||
| 203 | Go Daddy(r) API specification. | ||||||||||||||||||||||||||||||||||||||||||
| 204 | |||||||||||||||||||||||||||||||||||||||||||
| 205 | It is a sub class of L<WWW::GoDaddy::REST::Resource>. | ||||||||||||||||||||||||||||||||||||||||||
| 206 | |||||||||||||||||||||||||||||||||||||||||||
| 207 | =head1 METHODS | ||||||||||||||||||||||||||||||||||||||||||
| 208 | |||||||||||||||||||||||||||||||||||||||||||
| 209 | TODO: You'll have to read code to understand the methods listed here for | ||||||||||||||||||||||||||||||||||||||||||
| 210 | now. See L<WWW::GoDaddy::REST::Resource> for at least some of this. | ||||||||||||||||||||||||||||||||||||||||||
| 211 | |||||||||||||||||||||||||||||||||||||||||||
| 212 | =head1 AUTHOR | ||||||||||||||||||||||||||||||||||||||||||
| 213 | |||||||||||||||||||||||||||||||||||||||||||
| 214 | David Bartle, C<< <davidb@mediatemple.net> >> | ||||||||||||||||||||||||||||||||||||||||||
| 215 | |||||||||||||||||||||||||||||||||||||||||||
| 216 | =head1 COPYRIGHT & LICENSE | ||||||||||||||||||||||||||||||||||||||||||
| 217 | |||||||||||||||||||||||||||||||||||||||||||
| 218 | Copyright (c) 2014 Go Daddy Operating Company, LLC | ||||||||||||||||||||||||||||||||||||||||||
| 219 | |||||||||||||||||||||||||||||||||||||||||||
| 220 | Permission is hereby granted, free of charge, to any person obtaining a | ||||||||||||||||||||||||||||||||||||||||||
| 221 | copy of this software and associated documentation files (the "Software"), | ||||||||||||||||||||||||||||||||||||||||||
| 222 | to deal in the Software without restriction, including without limitation | ||||||||||||||||||||||||||||||||||||||||||
| 223 | the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||||||||||||||||||||||||||||||||||||||||||
| 224 | and/or sell copies of the Software, and to permit persons to whom the | ||||||||||||||||||||||||||||||||||||||||||
| 225 | Software is furnished to do so, subject to the following conditions: | ||||||||||||||||||||||||||||||||||||||||||
| 226 | |||||||||||||||||||||||||||||||||||||||||||
| 227 | The above copyright notice and this permission notice shall be included in | ||||||||||||||||||||||||||||||||||||||||||
| 228 | all copies or substantial portions of the Software. | ||||||||||||||||||||||||||||||||||||||||||
| 229 | |||||||||||||||||||||||||||||||||||||||||||
| 230 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||||||||||||||||||||||||||||||||||||||||
| 231 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||||||||||||||||||||||||||||||||||||||||
| 232 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||||||||||||||||||||||||||||||||||||||||||
| 233 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||||||||||||||||||||||||||||||||||||||||
| 234 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||||||||||||||||||||||||||||||||||||||||||
| 235 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||||||||||||||||||||||||||||||||||||||||||
| 236 | DEALINGS IN THE SOFTWARE. | ||||||||||||||||||||||||||||||||||||||||||
| 237 | |||||||||||||||||||||||||||||||||||||||||||
| 238 | =cut | ||||||||||||||||||||||||||||||||||||||||||