У меня есть следующий код:
$requests[] = new Google_Service_Slides_Request(array(
'createSlide' => array(
'objectId' => $slideMapId,
'insertionIndex'=> 1,
'slideLayoutReference' => array('predefinedLayout' => 'MAIN_POINT'),
'placeholderIdMappings'=> array(
'objectId' => $TitleId,
'layoutPlaceholder'=> array('type' => 'BODY','index' => 0,"parentObjectId" => $slideobjid
))
)
));
При его использовании я получаю следующую ошибку:
Неустранимая ошибка: Uncaught Google_Service_Exception: {"error": {"code": 400," message ":" Запрос содержит недопустимый аргумент. "," Errors ": [{" message ":" Запрос содержит недопустимый аргумент. "," Domain ":" global "," reason ":" badRequest"}]," status ":" INVALID_ARGUMENT "}}
Stacktrace:
in /var/www/Google_Slider/vendor/google/apiclient/src/Google/Http/REST.php:118 Stack trace:
#0 /var/www/Google_Slider/vendor/google/apiclient/src/Google/Http/REST.php(94): Google_Http_REST::decodeHttpResponse(Object(GuzzleHttp\Psr7\Response), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...')
#1 /var/www/Google_Slider/vendor/google/apiclient/src/Google/Task/Runner.php(176): Google_Http_REST::doExecute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...')
#2 /var/www/Google_Slider/vendor/google/apiclient/src/Google/Http/REST.php(58): Google_Task_Runner->run()
#3 /var/www/Google_Slider/vendor/google/apiclient/src/Google/Client.php(842): Google_Http_REST::execute(Ob in /var/www/Google_Slider/vendor/google/apiclient/src/Google/Http/REST.php on line 118