File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
includes/Actions/ZohoSheet Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 22
33namespace BitCode \FI \Actions \ZohoSheet ;
44
5- use WP_Error ;
6- use BitCode \FI \Flow \FlowController ;
75use BitCode \FI \Core \Util \HttpHelper ;
6+ use BitCode \FI \Flow \FlowController ;
7+ use WP_Error ;
88
99class ZohoSheetController
1010{
@@ -118,7 +118,14 @@ public static function getWorksheetHeader($requestParams)
118118 'Authorization ' => 'Zoho-oauthtoken ' . $ token ->access_token ,
119119 ];
120120
121- $ apiEndpoint = "https://sheet.zoho. {$ requestParams ->dataCenter }/api/v2/ {$ requestParams ->workbook }?method=worksheet.records.fetch&worksheet_name= {$ requestParams ->worksheet }&count=1&header_row= {$ requestParams ->headerRow }" ;
121+ $ queryParams = [
122+ 'method ' => 'worksheet.records.fetch ' ,
123+ 'worksheet_name ' => $ requestParams ->worksheet ,
124+ 'count ' => 1 ,
125+ 'header_row ' => $ requestParams ->headerRow
126+ ];
127+ $ apiEndpoint = "https://sheet.zoho. {$ requestParams ->dataCenter }/api/v2/ {$ requestParams ->workbook }? " . http_build_query ($ queryParams );
128+
122129 $ apiResponse = HttpHelper::get ($ apiEndpoint , null , $ headers );
123130
124131 if (isset ($ apiResponse ->records )) {
You can’t perform that action at this time.
0 commit comments