cartel v0.6.0 Cartel.Message.Apns.Item

Apple APNS Binary API item submessage

For more details on the format see the Binary Provider API section of Apple Local and Remote Notification Programming Guide

Summary

Types

t()

Apple APNS Binary API item submessage

Functions

Returns the device_token item binary protocol id

Encodes the item to binary format

Returns the expiration_date item binary protocol id

Returns the notification_identifier item binary protocol id

Returns the payload item binary protocol id

Returns the priority item binary protocol id

Returns the priority_immediately item binary protocol value

Returns the priority_when_convenient item binary protocol value

Types

t :: %Cartel.Message.Apns.Item{data: String.t | %{} | Integer.t, id: Integer.t}

Apple APNS Binary API item submessage

id: device_token/0, payload/0, notification_identifier/0, expiration_date/0 or priority/0

data: the value varies based on id:

  • device_token: String.t, token of the recipient
  • payload: Map representing the notification payload
  • notification_identifier: Integer.t id for delivery errors
  • expiration_date: Integer.t, UNIX timestamp of notification expiration
  • priority: priority_immediately/0 or priority_when_convenient/0

Functions

device_token()

Specs

device_token :: Integer.t

Returns the device_token item binary protocol id

encode(item)

Specs

encode(t) :: {:ok, <<_::_ * 24>>}

Encodes the item to binary format

expiration_date()

Specs

expiration_date :: Integer.t

Returns the expiration_date item binary protocol id

notification_identifier()

Specs

notification_identifier :: Integer.t

Returns the notification_identifier item binary protocol id

payload()

Specs

payload :: Integer.t

Returns the payload item binary protocol id

priority()

Specs

priority :: Integer.t

Returns the priority item binary protocol id

priority_immediately()

Specs

priority_immediately :: Integer.t

Returns the priority_immediately item binary protocol value

priority_when_convenient()

Specs

priority_when_convenient :: Integer.t

Returns the priority_when_convenient item binary protocol value