1.0.4 • Published 6 years ago

fpm-plugin-jpush v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

FPM-PLUGIN-JPUSH

用于极光推送的插件

Install

yarn add fpm-plugin-jpush

Basic Info

  • Run Action Hook Name:
    • INIT init the jpush client
    • BEFORE_SERVER_START extend the biz module
  • ExtendModule Name: jpush
  • Exception
    • E.JPush.PUSH_ERROR
      			{
        errno: -10021, 
        code: 'PUSH_ERROR', 
        message: ''
      }
      			```
  • getDependencies()
    • []
  • The Reference Of The Bind() Method An BizModule Object Contains Functions
    • push
    • getRecords

Useage

  • Add Config Set $ vim config.json add jpush entry
    {
        //...
        "jpush": {
            "appkey": "",
            "secretkey": "",
        }
    }
  • Use Functions

    • method: jpush.push args: { title: 'foo', content: 'foo2', extras: {'url': 'http://blog.yunplus.io'}}

    • jpush.getRecords()

      var func = new YF.Func('jpush.getRecords');
      func.invoke({ limit: 10, skip: 0})
        .then(function(data){
          console.log(data)
        }).catch(function(err){
        })
1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.1

6 years ago