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 🙏

© 2024 – Pkg Stats / Ryan Hefner

sun-getui-sdk

v0.0.4

Published

sun-getui-sdk

Downloads

9

Readme

getui sdk

lib为官方的原版目录 具体api需要参考官方 http://docs.getui.com/server/nodejs/start/

Install

npm install --save sun-getui-sdk

Examples

const getui = require('sun-getui-sdk')
const getuiConfig = {
    "appId": "O6Yu3JHjV98ZskTkzcHhQ",  
    "appKey": "alhTZbRL7m9LW1aEXqsoP4",
    "appSecret": "cKnTp73lQx6cKxkPjuOu48",
    "masterSecret": "yRYxy2nNr3AU7t67QfqZLA",
    "host": "https://api.getui.com/apiex.htm"
}
const getuiDemo = new getui.GeTui(getuiConfig.host, getuiConfig.appKey, getuiConfig.masterSecret)
const template = new getui.LinkTemplate({
    appId: getuiConfig.appId,
    appKey: getuiConfig.appKey,
    title: '个推',
    text: '个推最新版点击下载',
    logoUrl: 'http://wwww.igetui.com/logo.png',
    isRing: true,
    isVibrate: true,
    isClearable: false,
    url: 'http://www.igetui.com'
});

const message = new getui.SingleMessage({
  isOffline: true,
  offlineExpireTime: '123123',
  data: template
});

const target = new getui.Target({
  appId: getuiConfig.appId,
  clientId: '0b4cad197eaef79fd8225d236542fc8f'
});
getuiDemo.pushMessageToSingle(message, target)
  .then(console.log)
  .catch(console.error);

tip: 没有使用5+sdk就不用看下面代码了

// 针对在5+sdk使用了透传消息的,建议消息内容使用标准目标,才可以进入消息中心 但是ios在线的时候消息时不进入消息中心的,需要在页面监听receive事件
var template =  new getui.TransmissionTemplate({
      appId: getuiConfig.appId,
      appKey: getuiConfig.appKey,
      transmissionType: 1,
      transmissionContent: "{\"title\":\"您有新的通知\",\"content\":\"请查阅:XXX批发公司已经审核了您的订单!\",\"payload\":{\"type\":1,\"refnumber\" :\"1000263\" ,\"total_count\":5}}"
});