home-school-contact-app/源码/php/AiYaSchoolPush/xmpush/Tracer.php

48 lines
1.0 KiB
PHP
Raw Permalink Normal View History

2021-10-19 00:18:35 +00:00
<?php
/**
* 消息状态追踪API.
* @author wangkuiwei
* @name Tracer
* @desc 消息状态追踪API。
*
*/
namespace xmpush;
class Tracer extends HttpBase {
public function __construct(){
parent::__construct();
}
public function getMessageStatusById($msgId,$retries=1){
$fields = array(
'msg_id' => $msgId
);
$url = Constants::$domain.Constants::message_trace_url;
$result = $this->getResult($url, $fields, $retries);
return $result;
}
public function getMessageStatusByJobKey($jobKey,$retries=1){
$fields = array(
'job_key' => $jobKey
);
$url = Constants::$domain.Constants::message_trace_url;
$result = $this->getResult($url, $fields, $retries);
return $result;
}
public function getMessagesStatusByTimeArea($beginTime,$endTime,$retries=1){
$fields = array(
'begin_time' => $beginTime,
'end_time' => $endTime
);
$url = Constants::$domain.Constants::messages_trace_url;
$result = $this->getResult($url, $fields, $retries);
return $result;
}
}
?>