Skip to content

Commit a20e793

Browse files
committed
update project alert params app_key in obj
1 parent 6354def commit a20e793

File tree

9 files changed

+2358
-215
lines changed

9 files changed

+2358
-215
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
JPush API client library for Java
2+
API 协议文档: http://docs.jpush.cn/pages/viewpage.action?pageId=2621796
3+
4+
其他语言的开发包: http://docs.jpush.cn/pages/viewpage.action?pageId=2228302
5+
6+
JPush Change List: http://docs.jpush.cn/pages/viewpage.action?pageId=3309737

example/example.php

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,49 @@
33
$master_secret = '570f9aadcffe791658dde66b';
44
$app_key='7ebc243ae2b37128472b0875';
55
$sendno=9;
6-
7-
$client = new JpushClient($master_secret,0);
6+
7+
echo phpinfo();
8+
$client = new JpushClient($app_key,$master_secret,0);
89

910
//send message by tag
10-
$str = $client->sendNotificationByTag('tagapi', $app_key, $sendno, 'des',
11+
$str = $client->sendNotificationByTag('tagapi', $sendno, 'des',
1112
'tag notify title','tag notify content', 'android','');
1213
echo $str."\n";
1314

1415
//
1516
$sendno++;
16-
$str = $client->sendCustomMesByTag('tagapi', $app_key, $sendno, 'des',
17+
$str = $client->sendCustomMesByTag('tagapi', $sendno, 'des',
1718
'tag notify title','tag notify content', 'android','');
1819
echo $str."\n";
1920

2021
//
2122
$sendno++;
22-
$str = $client->sendNotificationByAlias('tagapi', $app_key, $sendno, 'des',
23+
$str = $client->sendNotificationByAlias('tagapi', $sendno, 'des',
2324
'tag notify title','tag notify content', 'android','');
2425
echo $str."\n";
2526

2627
//
2728
$sendno++;
28-
$str = $client->sendCustomMesByAlias('tagapi', $app_key, $sendno, 'des',
29+
$str = $client->sendCustomMesByAlias('tagapi', $sendno, 'des',
2930
'tag notify title','tag notify content', 'android','');
3031
echo $str."\n";
3132

3233
//
3334
$sendno++;
34-
$str = $client->sendNotificationByAppkey($app_key, $sendno, 'des',
35+
$str = $client->sendNotificationByAppkey($sendno, 'des',
3536
'tag notify title','tag notify content', 'android','');
3637
echo $str."\n";
3738

3839
//
3940
$sendno++;
40-
$str = $client->sendCustomMesByAppkey($app_key, $sendno, 'des',
41+
$str = $client->sendCustomMesByAppkey($sendno, 'des',
4142
'tag notify title','tag notify content', 'android','');
4243
echo $str."\n";
44+
45+
$msg_ids="929123086,1197558554";
46+
$str = $client->getReceivedApi($msg_ids);
47+
echo $str."\n";
48+
49+
50+
4351
?>

0 commit comments

Comments
 (0)