-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Google_Service_Groupssettings_Resource_Groups::get returns object with all properties null #2140
Copy link
Copy link
Open
Labels
type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
Environment details
- PHP version: 7.3
- Package name and version: "google/apiclient": "^2.11"
Steps to reproduce
- try to retrieve Group Settings via PHP SDK.
Code example
$settings = (new \Google_Service_Groupssettings($this->getClient()))->groups->get('xxx@gmail.com');
var_dump($settings); // Object Google\Service\Groupssettings\Groups with all properties null.I've tried to trace the code, body of HTTP response was XML, bug SDK tries to parse the body with json_decode().
Add optParams to specify response format to JSON could solve this problem,
$settings = (new \Google_Service_Groupssettings($this->getClient()))->groups->get('xxx@gmail.com', ['alt' => 'json']);
var_dump($settings); // seems okIt's better for SDK to add this optParams automatically, instead of letting developer to add this param manually.
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.