codedge-llc / pigeon

iOS and Android push notifications for Elixir
https://hex.pm/packages/pigeon
MIT License
639 stars 143 forks source link

Add typespecs for success and failure cases on FCM #230

Closed jsmestad closed 1 year ago

jsmestad commented 1 year ago

Context

I think it's helpful to see these as types in the code itself versus only in the description of the docs.

On successful response, :name will be set to the name returned from the FCM API and :response will be :success. If there was an error, :error will contain a JSON map of the response and :response will be an atomized version of the error type.