diff --git a/lib/Google/API/Client.pm b/lib/Google/API/Client.pm index eff4e0d..bfcf6fe 100644 --- a/lib/Google/API/Client.pm +++ b/lib/Google/API/Client.pm @@ -31,6 +31,10 @@ sub build { $discovery_service_url =~ s/{api}/$service/; $discovery_service_url =~ s/{apiVersion}/$version/; + if (($service eq 'searchconsole') && ($version eq 'v1')) { + $discovery_service_url = 'https://searchconsole.googleapis.com/$discovery/rest'; + } + my $req = HTTP::Request->new(GET => $discovery_service_url); my $res = $self->{ua}->request($req); unless ($res->is_success) {