PHP5 class for push message to Jeapie
For send message:
1) Set params
PushMessage::init()
->setToken('tokenKey') // required
->setTitle('titleOfMessage') // optional
->setMessage('bodyOfMessage') // required
->setPriority(0) // optional. can be -1, 0, 1
2) Send
PushMessage::init()
->setDevice('htcsensation') // not require. Using only for personalSend()
->personalSend();
PushMessage::init()
->setEmails(array( // required. Using only for usersSend()
'[email protected]',
'[email protected]',
))
->usersSend();
PushMessage::init()
->broadcastSend(); // return true or false
Also you can get result as
PushMessage::init()->getResult();
If result return false you can get errors:
PushMessage::init()->getErrors();
If you have error "SSL certificate problem: unable to get local issuer certificate" on your local server please use the method disableSslVerification().
If you are not familiar with Jeapie - visit http://jeapie.com
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request