npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mobtech/mobpush

v1.0.2

Published

MobPush API for NodeJS in www.mob.com

Readme

MobPush API for NodeJS 为了帮助开发者更方便接入MobPush免费推送SDK,提供完整的API接口的NodeJS实现,包含设备操作相关接口、推送操作相关接口以及公共接口。

了解更多 MobPush 免费推送 SDK.

优势 🚀

免费使用自定义 UI稳定服务流程体验数据同步专业技术团队服务

接口 🌰

  • 推送接口:
    • 广播推送 pushAll
    • 别名推送 pushByAlias
    • 用户标签推送 pushByTags
    • Registration ID 推送 pushByRids
    • 复杂地理位置推送 pushByAreas
    • 用户自定义配置推送 pushTaskV3
  • 推送任务详情查询接口
    • 查询推送任务详情(根据 batchId) getPushByBatchId
    • 查询推送任务详情(根据 workno) getPushByWorkno
  • 推送任务的处理接口
    • 取消推送任务(根据 workId) cancelPushTask
    • 替换推送任务(根据 workId) replacePushTask
    • 撤回推送任务(根据 workId) recallPushTask
  • 查询推送统计接口
    • 根据推送任务 id 查询统计 getStatsByWorkId
    • 根据推送任务 id 批量查询统计 getStatsByWorkIds
    • 根据用户 id 查询统计 getStatsByWorkno
    • 按小时查询统计 getStatsByHour
    • 按日期查询统计 getStatsByDay
    • 根据 id 查询任务下发给设备的详情统计 getStatsByDevice

安装

$ npm install @mobtech/mobpush

使用示例

const MobPush = require("@mobtech/mobpush");
const api = new MobPush(appkey, appSecret);
let result = await api.pushAll(param1, param2, param3, ...);

错误码请参考:MobPush Api 错误码

API - 方法

pushAll - 广播推送

/**
 * @name pushAll(广播推送)
 *
 * @param {string} workNo 任务标识
 * @param {string} title 推送标题
 * @param {string} content 推送内容
 *
 */
pushAll(workNo, title, content);

pushByAlias - 别名推送

/**
 * @name pushByAlias(别名推送)
 * @param {string} workNo 任务标识
 * @param {string} title 推送标题
 * @param {string} content 推送内容
 * @param {string} alias  别名,可以传入多个
 */
pushByAlias(workNo, title, content, alias);

pushByTags - 标签推送

/**
 * @name pushByTags(标签推送)
 * @param {string} workNo 任务标识
 * @param {string} title 推送标题
 * @param {string} content 推送内容
 * @param {string} tags  标签,可以传入多个
 */
pushByTags(workNo, title, content, tags);

pushByRids - RegistrationId 推送

/**
 * @name pushByRids(RegistrationId推送)
 * @param {string} workNo 任务标识
 * @param {string} title 推送标题
 * @param {string} content 推送内容
 * @param {string} rids  Registration Id,可以传入多个
 */
pushByRids(workNo, title, content, rids);

pushByAreas - 特殊地理位置推送)

/**
 * @name pushByAreas(特殊地理位置推送)
 * @param {string} workNo 任务标识
 * @param {string} title 推送标题
 * @param {string} content 推送内容
 * @param {object} pushAreas  地理位置
 */
pushByAreas(workNo, title, content, pushAreas);

getPushByBatchId - 根据任务 id 获取推送任务信息

/**
 * @name getPushByBatchId(根据任务id获取推送任务信息)
 *
 * @param {string} batchId 任务id
 */
getPushByBatchId(batchId);

getPushByWorkno - 根据用户 id 获取推送任务信息

/**
 * @name getPushByWorkno(根据用户id获取推送任务信息)
 *
 * @param {string} workNo 任务标识
 */
getPushByWorkno(workno);

cancelPushTask - 根据任务 id 取消推送

/**
 * @name cancelPushTask(根据任务id取消推送)
 *
 * @param {string} workId 任务id
 */
cancelPushTask(workId);

replaceTask - 根据任务id替换推送

/**
 * @name replaceTask(根据任务id替换推送)
 * @param {string} workId 任务id
 * @param {string} content 重新推送的内容
 */
replaceTask(workId, content);

recallTask - 根据任务id撤回推送任务

/**
 * @name recallTask(根据任务id撤回推送任务)
 * @param {string} workId 任务id
 */
recallTask(workId);

getStatsByWorkId - 根据推送任务id查询统计

/**
 * @name getStatsByWorkId(根据推送任务id查询统计)
 *
 * @param {string} workId 任务Id
 */
getStatsByWorkId(workId);

getStatsByWorkIds - 根据推送任务id批量查询统计

/**
 * @name getStatsByWorkIds(根据推送任务id批量查询统计)
 *
 * @param {string} workIds
 */
getStatsByWorkIds(workIds);

getStatsByWorkno - 根据用户的id查询统计

/**
 * @name getStatsByWorkno(根据用户的id查询统计)
 *
 * @param {string} workno 用户的推送任务id
 */
getStatsByWorkno(workno);

getStatsByHour - 按小时查询统计

/**
 * @name getStatsByHour(按小时查询统计)
 *
 * @param {string} hour 小时
 */
getStatsByHour(hour);

getStatsByDay - 按天查询统计

/**
 * @name getStatsByDay(按天查询统计)
 *
 * @param {string} day 天
 */
getStatsByDay(day);

getStatsByDevice - 统计每次下发的设备信息

/**
 * @name getStatsByDevice(统计每次下发的设备信息)
 *
 * @param {string} workId 任务id
 * @param {number} pageIndex 页码
 * @param {number} pageSize 页数
 */
getStatsByDevice(workId, pageIndex, pageSize);