Connected Devices/Projects/Project Link/Taxonomy: Difference between revisions

Jump to navigation Jump to search
→‎WebPush: Some reviews
(→‎Fetching: Layout)
(→‎WebPush: Some reviews)
Line 175: Line 175:


== WebPush ==
== WebPush ==
Note: In the future, there will be a ChannelKind (or equivalent) to replace the id.
* Get current subscriptions
    PUT http://localhost:3000/api/v1/channels/get {"id": "getter:subscription.webpush@link.mozilla.org"}
* Get current resources receiving notifications on
    PUT http://localhost:3000/api/v1/channels/get {"id": getter:resource.webpush@link.mozilla.org"}
(the following lines have not been reviewed)
* Add push subscription
* Add push subscription
** PUT http://localhost:3000/api/v1/channels/set {"select": {"id": "setter:subscribe.webpush@link.mozilla.org"}, "value": {"Json": {“subscriptions”:[{“push_uri”:”http://push.service/t54wtresfesfd”,”public_key”:”base64_encoded_key”}]}}}
** PUT http://localhost:3000/api/v1/channels/set {"select": {"id": "setter:subscribe.webpush@link.mozilla.org"}, "value": {"Json": {“subscriptions”:[{“push_uri”:”http://push.service/t54wtresfesfd”,”public_key”:”base64_encoded_key”}]}}}
Line 181: Line 190:
* Set resources to receive notifications on
* Set resources to receive notifications on
** PUT http://localhost:3000/api/v1/channels/set {"select": {"id": "setter:resource.webpush@link.mozilla.org"}, "value": {"Json": {“resources”:[“res1”, “res2”]}}}
** PUT http://localhost:3000/api/v1/channels/set {"select": {"id": "setter:resource.webpush@link.mozilla.org"}, "value": {"Json": {“resources”:[“res1”, “res2”]}}}
* Get current subscriptions
** PUT http://localhost:3000/api/v1/channels/get {"select": {"id": "getter:subscription.webpush@link.mozilla.org"}, "value": {"Json": {}}}
* Get current resources receiving notifications on
** PUT http://localhost:3000/api/v1/channels/get {"select": {"id": "getter:resource.webpush@link.mozilla.org"}, "value": {"Json": {}}}
* Trigger notification
* Trigger notification
** PUT http://localhost:3000/api/v1/channels/set {"select": {"id": "setter:notify.webpush@link.mozilla.org"}, "value": {"Json": {“resource”:“res1”,”message”:”push_message_data”}}}
** PUT http://localhost:3000/api/v1/channels/set {"select": {"id": "setter:notify.webpush@link.mozilla.org"}, "value": {"Json": {“resource”:“res1”,”message”:”push_message_data”}}}
184

edits

Navigation menu