New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

xmpush-api

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xmpush-api

基于小米官方v3版本的推送,只支持android的alias推送、userAccount推送和广播推送(Topic)

latest
Source
npmnpm
Version
1.4.2
Version published
Maintainers
1
Created
Source

xmpush-api

支持小米v3版本,只实现推送到android,Alias消息, UserAccount消息(单个用户消息),广播消息(使用Topic)

使用的小米的官方信息有: https://dev.mi.com/console/doc/detail?pId=1163

我司一开始使用的是alias消息,所以这个是测试过,可以参考examples里面的用例; 我司现在使用的是:UserAccount消息(单个用户消息),广播消息(使用Topic) 此包现在只提供了我司用到的一些功能。

Installation

using npm:

npm install --save xmpush-api

In Node.js

var SendUserAccountMessage = require('xmpush-api').SendUserAccountMessage;

SendAliasMessage('your appSecret', {
    payload: 'hello workd',
    title: 'hello workd',
    description: 'hello workd',
    notifyType: 5,
    restrictedPackageNames: ['your apk name'],
    passThrough: 0, //0: 通知栏消息,1: 透传消息
    notifyId : -1,
    alias: 'wolrd',
    extra: {
        'notify_foreground': 1,
        'notify_effect': 2,
        'click_intent_uri': 'hahhahha'
    }
}, function(err, body, res) {
    console.log('err-> %j', err);
    console.log('body-> %j', body);
    console.log('res-> %j', res);
})

Keywords

xiaomipush

FAQs

Package last updated on 25 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts