No Description

Tracer.php 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * 消息状态追踪API.
  4. * @author wangkuiwei
  5. * @name Tracer
  6. * @desc 消息状态追踪API。
  7. *
  8. */
  9. namespace xmpush;
  10. class Tracer extends HttpBase {
  11. public function __construct() {
  12. parent::__construct();
  13. }
  14. public function getMessageStatusById($msgId, $retries = 1) {
  15. $fields = array(
  16. 'msg_id' => $msgId
  17. );
  18. $result = $this->getResult(PushRequestPath::V1_MESSAGE_STATUS(), $fields, $retries);
  19. return $result;
  20. }
  21. public function getMessageStatusByJobKey($jobKey, $retries = 1) {
  22. $fields = array(
  23. 'job_key' => $jobKey
  24. );
  25. $result = $this->getResult(PushRequestPath::V1_MESSAGE_STATUS(), $fields, $retries);
  26. return $result;
  27. }
  28. public function getMessagesStatusByTimeArea($beginTime, $endTime, $retries = 1) {
  29. $fields = array(
  30. 'begin_time' => $beginTime,
  31. 'end_time' => $endTime
  32. );
  33. $result = $this->getResult(PushRequestPath::V1_MESSAGES_STATUS(), $fields, $retries);
  34. return $result;
  35. }
  36. }
  37. ?>