You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.9 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?php
require_once(dirname(__FILE__) . '/' . 'GTBaseApi.php');
/**
* 推送相关api官网文档路径http://docs.getui.com/getui/server/rest_v2/push/
**/
class GTPushApi extends GTBaseApi
{
public function __construct($gtClient){
$this->gtClient = $gtClient;
}
//向单个用户推送消息可根据cid指定用户
function pushToSingleByCid($params){
return $this->post("/push/single/cid", $params->getApiParam());
}
function pushToSingleByAlias($params){
return $this->post("/push/single/alias", $params->getApiParam());
}
function pushBatchByCid($params){
return $this->post("/push/single/batch/cid", $params->getApiParam());
}
function pushBatchByAlias($params){
return $this->post("/push/single/batch/alias", $params->getApiParam());
}
function createListMsg($params){
return $this->post("/push/list/message", $params->getApiParam());
}
function pushListByCid($params){
return $this->post("/push/list/cid", $params->getApiParam());
}
function pushListByAlias($params){
return $this->post("/push/list/alias", $params->getApiParam());
}
function pushAll($params){
return $this->post("/push/all", $params->getApiParam());
}
function pushByTag($params){
return $this->post("/push/tag", $params->getApiParam());
}
function pushByFastCustomTag($params){
return $this->post("/push/fast_custom_tag", $params->getApiParam());
}
//停止任务
function stopPush($params)
{
return $this->delete("/task/" . $params, null);
}
//查询定时任务状态
function queryScheduleTask($params)
{
return $this->get("/task/schedule/" . $params, null);
}
//删除定时任务
function deleteScheduleTask($params)
{
return $this->delete("/task/schedule/" . $params, null);
}
}