· 9 years ago · Jan 16, 2017, 01:22 PM
1<?php
2try{
3 $request = $this->client->createRequest('POST', sprintf( "%s/chart/copy", $this->baseUrl ),
4 array(
5 "json" => array(
6 "secretKey" => $this->getSecretKey(),
7 "chartKey" => $chartKey
8 )
9 )
10 );
11 $response = $this->client->send($request);
12 }
13 catch(Exception $e){
14 return array(
15 "error" => "copy_charts"
16 );
17 }
18 var_dump($response); die;
19 return json_decode($response->getBody()->getContents(), true);