include "ba
public function checkinQueryApi() {
$api = new ApiService(array(
'appKey' => '*****',
'appSecret' => '******',
));
// 查询打卡数据
$headers = array(
"Api-Module" => "KQ",
"Api-Cmd" => "checkin_query",
);
$params["next_id"] = 0;
$params["page_size"] = 50;
$api->checkinQuery($headers, $params);
}
}
$qc = new ApiService();
$qc -> checkinQueryApi();
ba
public function makeRequest($path, $headers, $params) {
// 获取请求数据
$appId = $this -> getAppKey();
$appSecret = $this -> getAppSecret();
$time = $this -> getUnixTimestamp();
$domain = $this -> domain;
// 设置请求头
$sig = $this->makeSignedRequest(array(
"path" => $path,
"time" => $time,
"key" => $appId,
"secret" => $appSecret
));
$headers_ba
"Content-type" => "application/json",
"App-Key" => $appId,
"App-Timestamp" => $time,
"App-Sig" => $sig
);
if(isset($headers)){
$headers_ba
}
$request = Requests::post($domain.$path, $headers_ba
print($request->body);
$result = $request->body;
return $result;
}
如何在demo.php里面获取到 ba
最佳答案
