-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMessage.php
More file actions
40 lines (31 loc) · 747 Bytes
/
Copy pathMessage.php
File metadata and controls
40 lines (31 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/**
* HwPush基类
*/
namespace hwpush;
class Message
{
//登录接口地址
const BASE_LOGIN_URL = 'https://login.cloud.huawei.com';
//推送接口地址
const BASE_PUSH_URL = 'https://api.push.hicloud.com/pushsend.do?';
//授权类型
const GRANT_TYPE = 'client_credentials';
//nsp_svc
const NSP_SVC = 'openpush.message.api.send';
//clientId
protected $clientId;
//clientSecret
protected $clientSecret;
/**
* 初始化配置
*
* @param string $clientId
* @param string $clientSecret
*/
public function setClient(string $clientId, string $clientSecret)
{
$this->clientId = $clientId;
$this->clientSecret = $clientSecret;
}
}