Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Google_Sheet_Helpers::api_call( mixed $body, mixed $action = null )
Method api_call
Contents
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Parameters Parameters
- $body
(Required)
- $action
(Optional)
Default value: null
Return Return
(void)
Source Source
File: src/integrations/google-sheet/helpers/google-sheet-helpers.php
public function api_call( $body, $action = null ) { $body['access_token'] = $this->get_google_client(); $params = array( 'endpoint' => self::API_ENDPOINT, 'body' => $body, 'action' => $action, 'timeout' => 10, ); $response = Api_Server::api_call( $params ); if ( 200 !== $response['statusCode'] ) { throw new \Exception( $params['endpoint'] . ' failed' ); } return $response; }
Expand full source code Collapse full source code View on Github