Parse for Push(1)Documents Reading

Parse for Push(1)Documents Reading

REST API document for Sending Push
https://www.parse.com/docs/rest/guide

https://www.parse.com/docs/rest/guide#push-notifications

JS Guide Sending Message
https://www.parse.com/docs/js/guide#push-notifications

I like this client API to get the device token
https://github.com/raix/push

https://atmospherejs.com/raix/push

And this API for the server side
https://github.com/pjay/plush

It seems to me some overlap between Parse and Meteor. We do not have to use Parse for push notification.

We can also use Parse for schedule and push notification. We can use cordova to get the device token and then send it to Parse.com
curl -X POST \
  -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
  -H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
        "deviceType": "ios",
        "deviceToken": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdad",
        "channels": [
          ""
        ]
      }' \
  https://api.parse.com/1/installations

We can directly send push notification through Parse.com based on the objectId.
curl -X PUT \
  -H "X-Parse-Application-Id: oEI3DHtrBBgNosZyyVXjMIe6yNlNyYj5xY4g5X7z" \
  -H "X-Parse-REST-API-Key: 56eRw1D0RZG3GHuRbV3t2KWdsKkFKy2mkM6E9KkP" \
  -H "Content-Type: application/json" \
  -d '{
        "user": {
          "__type": "Pointer",
          "className": "_User",
          "objectId": "vmRZXZ1Dvo"
        }
      }' \
  https://api.parse.com/1/installations/mrmBZvsErB

For parse, we have the benefit:
1 Do not need to deal with javaAPNS, GCM java client
2 We have schedule, delay sending message
3 We have the analytics for the Messages we send out

References:
https://www.parse.com/?
http://blog.csdn.net/lixiaodaoaaa/article/details/8694570
http://www.cnblogs.com/over140/archive/2013/06/12/3132496.html
http://hgx615.iteye.com/blog/1853858
http://www.iteye.com/topic/1129477

你可能感兴趣的:(Parse for Push(1)Documents Reading)