pushex v0.0.2 Pushex.ResponseHandler behaviour

This module defines the behaviour to handle notification responses.

It can be used to log the responses or save them in a database for example.

Examples

defmodule MyResponseHandler do
  def handle_response(response, request, {pid, ref}) do
    # do whatever you want with the response and request
    # for example, logging or saving in a DB
  end
end

Summary

Functions

handle_response(response, request, info)

Callbacks

handle_response(response, request, info)

Specs

handle_response(response :: {:ok, Pushex.GCM.Response} | {:error, Pushex.GCM.HTTPError}, request :: Pushex.GCM.Request, info :: {pid, reference}) :: :ok