cartel v0.6.0 Cartel.Message.Wns

Microsoft WNS message

For more details on the format see Push notification service request and response headers (Windows Runtime apps) section of the Sending push notifications with WNS

Summary

Types

t()

Microsoft WNS message

Functions

Returns the Content-Type HTTP header value for the message

Returns the X-WNS-Type HTTP header value for type badge

Returns the X-WNS-Type HTTP header value for type raw

Returns the X-WNS-Type HTTP header value for type tile

Returns the X-WNS-Type HTTP header value for type toast

Types

t :: %Cartel.Message.Wns{cache_policy: boolean, channel: String.t, group: String.t, payload: binary | String.t, request_for_status: boolean, suppress_popup: boolean, tag: String.t, ttl: Integer.t, type: String.t}

Microsoft WNS message

  • channel: recipient channel URI obtained from the user
  • type: one of type_toast/0, type_badge/0, type_tile/0 or type_raw/0
  • tag: notification tag
  • group: notification group
  • ttl: seconds since sending after which the notification expires
  • cache_policy: wether to cache notification when device is offline.
  • suppress_popup: suppress popups for type_toast/0 notification
  • request_for_status: add device and connection status in reply
  • payload: raw octet stream data when type is type_raw/0, serialized XML string otherwise

Functions

content_type(wns)

Specs

content_type(message :: %Cartel.Message.Wns{cache_policy: term, channel: term, group: term, payload: term, request_for_status: term, suppress_popup: term, tag: term, ttl: term, type: term}) :: String.t

Returns the Content-Type HTTP header value for the message

type_badge()

Specs

type_badge :: String.t

Returns the X-WNS-Type HTTP header value for type badge

type_raw()

Specs

type_raw :: String.t

Returns the X-WNS-Type HTTP header value for type raw

type_tile()

Specs

type_tile :: String.t

Returns the X-WNS-Type HTTP header value for type tile

type_toast()

Specs

type_toast :: String.t

Returns the X-WNS-Type HTTP header value for type toast