0.1.3 • Published 9 years ago

umeng v0.1.3

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

umeng

umeng push server by nodejs.This module create by promise. Reference api http://dev.umeng.com/message/ios/api-server-doc and http://dev.umeng.com/message/android/api-server-doc

Example

  var umeng = new UMENG({
			appKey: YOUR APPKEY,
			app_master_secret: YOUR MASTERSECRET
  });
  
  #android push
  
  umeng.androidPush({
			type: 'unicast',
			device_tokens: DEVICETOKENS,
			display_type: 'notification',
			body: {
				ticker: 'test ticker notification',
				title: 'test title notification',
				text: 'test text notification',
				custom: {
					key: val
				}
			}
		})
		
		
  #ios push

  umeng.iosPush({
            type: 'unicast',
            device_tokens: DEVICETOKENS,
            payload: {
                body: {
                    aps: {
                        alert: 'test alert notification'
                    },
                    custom: {
                        type: 1
                    }
                }
            }
        })

  #getstatus

  umeng.getStatus({
            "timestamp":"xx",
            "validation_token":"xx",
            "task_id":"xx"
        })


  #cancel

  umeng.cancel({
                    "timestamp": "xx",
                    "validation_token": "xx",
                    "task_id": "xx"
               })


  #upload

  umeng.upload({
                    "timestamp": "xx",
                    "validation_token": "xx",
                    "content": "xx"
               })
		

License

MIT

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago