Fcmex.Util (fcmex v0.6.2)
Utils for Fcmex
Link to this section Summary
Functions
Parses the given FCM response.
Link to this section Functions
Link to this function
parse_result(arg)
Parses the given FCM response.
Examples
iex> Fcmex.Util.parse_result({:ok, %HTTPoison.Response{status_code: 200, body: "{\"a\": 1}"}})
{:ok, %{"a" => 1}}
iex> Fcmex.Util.parse_result({:error, %HTTPoison.Error{id: 1, reason: "something goes wrong"}})
{:error, %HTTPoison.Error{id: 1, reason: "something goes wrong"}}