I am using PHP Client API for Google Pub/Sub and have noticed that whenever I am trying to make a request via PubSub service object, it generates the wrong API uri.
E.g. I try to request list of project Topics as follows:
$service = new Google_Service_Pubsub($client);
$topicsList = $service->projects_topics->listProjectsTopics('projects/my-1');
API comes with an error message:
Google_Service_Exception: Error calling GET https://www.googleapis.com/v1beta2/projects/my-1/topics: (404) Not Found
The catch is: the Uri generated is wrong. It should've been https://pubsub.googleapis.com/v1beta2/projects/my-1/topics
Anyone know a workaround for this? I am using the latest API Code from:
github.com/google/google-api-php-client/blob/master/src/Google/Service/Pubsub.php
It's definitely a bug in google-api-php-client and there is an issue about this: https://github.com/google/google-api-php-client/issues/567