ym-android-push

0.1.4 • Public • Published

安卓推送 sdk

push notification

const AndroidPush=require('@ym/android-push');
 
const androidPush = new AndroidPush({ appkey: 'd7f9bbd0030efabfc*******', masterkey: '73da1312e0e007e9a*******' });
 
androudPush.push({
  'platform': 'android',
  'audience': {
    'registration_id': ['190e35f7e074c9a076a']
  },
  'notification': {
    'alert': 'Hi, JPush!',
    'title': 'Send to Android',
    'builder_id': 1,
    'extras': {
      'newsid': 321
    },
  },
  'message': {
    'msg_content': 'Hi,JPush',
    'content_type': 'text',
    'title': 'msg',
    'extras': {
      'key': 'value'
    }
  },
  'options': {
    'time_to_live': 60,
    'apns_production': false
  }
}).then(r => console.log(1, r)).catch(e => console.log(2, e));

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i ym-android-push

      Weekly Downloads

      1

      Version

      0.1.4

      License

      ISC

      Unpacked Size

      12.6 kB

      Total Files

      5

      Last publish

      Collaborators

      • xuezi