1 Star 0 Fork 0

chencongbao_myslef / getui

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

个推SDK

配置
$config = (new \Getui\Config())->
    setAppId('llUBYSt12xg2mPbnOh6')->
    setAppKey('wP31m7pz12DVFmkHq9F6')->
    setMasterSecret('qMyiA12qJ912auukl4Hf8');
缓存
$cache = new Doctrine\Common\Cache\RedisCache();
$redis = new \Redis();
$redis->connect('172.26.224.178',6379,5);
$cache->setRedis($redis);
Authorization
$authorization = (new \Getui\Authorization($config))->withCacheDriver($cache);
绑定别名
(new \Getui\User())->withConfig($config)->withAuth($authorization)->aliasBind([
    [
        'cid'=>'ad9555f3c980cb0fe20de584ab9f0e3a',
        'alias'=>'15093570968'
    ]
]);
通过ClientId 获取别名
$alias = (new \Getui\User())->
withConfig($config)->
withAuth($authorization)->
getAliasByClientId('ad9555f3c980cb0fe20de584ab9f0e3a');
var_dump($alias);
指定Client Id 推送
(new \Getui\Push())->withConfig($config)->withAuth($authorization)->toSingleCid([
    'ad9555f3c980cb0fe20de584ab9f0e3a'
],(new \Getui\Message\NotificationMessage())->
setTitle('测1试32')->
setBody('订单已2经支3付1成功')->
setClickType('payload')->
setPayload([
    'jump_type'=>99,
    'jump_value'=>111
]));
指定 别名 推送
(new \Getui\Push())->withConfig($config)->withAuth($authorization)->toSingleAlias([
    '15093570968'
],(new \Getui\Message\NotificationMessage())->
setTitle('测试12')->
setBody('订单s已2经支3付1成功')->
setClickType('payload')->
setPayload([
    'jump_type'=>91,
    'jump_value'=>111
]));
推送全部用户
(new \Getui\Push())->withConfig($config)->withAuth($authorization)->toAll((new \Getui\Message\NotificationMessage())->
setTitle('测试2订单')->
setBody('全局2推送')->
setClickType('payload')->
setPayload([
    'jump_type'=>2,
    'jump_value'=>"id=1"
]));

空文件

简介

UniAPP个推SDK 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/chencongbao_myslef/getui.git
git@gitee.com:chencongbao_myslef/getui.git
chencongbao_myslef
getui
getui
master

搜索帮助