Current section

57 Versions

Jump to

Compare versions

11 files changed
+81 additions
-29 deletions
  @@ -1,4 +1,4 @@
1 - Copyright (c) 2015-2021 Codedge LLC (https://www.codedge.io/)
1 + Copyright (c) 2015-2022 Codedge LLC (https://www.codedge.io/)
2 2
3 3 Permission is hereby granted, free of charge, to any person obtaining a copy
4 4 of this software and associated documentation files (the "Software"), to deal
  @@ -2,8 +2,7 @@
2 2
3 3 > HTTP2-compliant wrapper for sending iOS and Android push notifications.
4 4
5 - [![Build Status](https://travis-ci.com/codedge-llc/pigeon.svg?branch=master)](https://travis-ci.com/codedge-llc/pigeon)
6 - [![Coverage Status](https://coveralls.io/repos/github/codedge-llc/pigeon/badge.svg)](https://coveralls.io/github/codedge-llc/pigeon)
5 + [![CI](https://github.com/codedge-llc/pigeon/actions/workflows/ci.yml/badge.svg)](https://github.com/codedge-llc/pigeon/actions/workflows/ci.yml)
7 6 [![Hex.pm](http://img.shields.io/hexpm/v/pigeon.svg)](https://hex.pm/packages/pigeon)
8 7 [![Hex.pm](http://img.shields.io/hexpm/dt/pigeon.svg)](https://hex.pm/packages/pigeon)
9 8
  @@ -17,7 +16,7 @@ Add `:pigeon` and as a `mix.exs` dependency:
17 16 ```elixir
18 17 def deps do
19 18 [
20 - {:pigeon, "~> 2.0.0-rc.0"}
19 + {:pigeon, "~> 2.0.0-rc.1"}
21 20 ]
22 21 end
23 22 ```
  @@ -26,23 +25,23 @@ end
26 25
27 26 Check the module documentation for your push notification service.
28 27
29 - - [Pigeon.ADM](https://hexdocs.pm/pigeon/Pigeon.ADM.html) - Amazon Android.
30 - - [Pigeon.APNS](https://hexdocs.pm/pigeon/Pigeon.APNS.html) - Apple iOS.
31 - - [Pigeon.FCM](https://hexdocs.pm/pigeon/Pigeon.FCM.html) - Firebase Cloud Messaging v1 API.
32 - - [Pigeon.LegacyFCM](https://hexdocs.pm/pigeon/Pigeon.LegacyFCM.html) - Firebase Cloud Messaging Legacy API.
28 + - [Pigeon.ADM](https://hexdocs.pm/pigeon/2.0.0-rc.0/Pigeon.ADM.html) - Amazon Android.
29 + - [Pigeon.APNS](https://hexdocs.pm/pigeon/2.0.0-rc.0/Pigeon.APNS.html) - Apple iOS.
30 + - [Pigeon.FCM](https://hexdocs.pm/pigeon/2.0.0-rc.0/Pigeon.FCM.html) - Firebase Cloud Messaging v1 API.
31 + - [Pigeon.LegacyFCM](https://hexdocs.pm/pigeon/2.0.0-rc.0/Pigeon.LegacyFCM.html) - Firebase Cloud Messaging Legacy API.
33 32
34 33 ### Creating Dynamic Runtime Dispatchers
35 34
36 35 Pigeon can spin up dynamic dispatchers for a variety of advanced use-cases, such as
37 36 supporting dozens of dispatcher configurations or custom connection pools.
38 37
39 - See [Pigeon.Dispatcher](https://hexdocs.pm/pigeon/Pigeon.Dispatcher.html) for instructions.
38 + See [Pigeon.Dispatcher](https://hexdocs.pm/pigeon/2.0.0-rc.0/Pigeon.Dispatcher.html) for instructions.
40 39
41 40 ### Writing a Custom Dispatcher Adapter
42 41
43 42 Want to write a Pigeon adapter for an unsupported push notification service?
44 43
45 - See [Pigeon.Adapter](https://hexdocs.pm/pigeon/Pigeon.Adapter.html) for instructions.
44 + See [Pigeon.Adapter](https://hexdocs.pm/pigeon/2.0.0-rc.0/Pigeon.Adapter.html) for instructions.
46 45
47 46 ## Contributing
48 47
  @@ -61,6 +60,6 @@ Git commit subjects use the [Karma style](http://karma-runner.github.io/5.0/dev/
61 60
62 61 ## License
63 62
64 - Copyright (c) 2015-2021 Codedge LLC (https://www.codedge.io/)
63 + Copyright (c) 2015-2022 Codedge LLC (https://www.codedge.io/)
65 64
66 65 This library is MIT licensed. See the [LICENSE](https://github.com/codedge-llc/pigeon/blob/master/LICENSE) for details.
  @@ -2,7 +2,7 @@
2 2 {<<"build_tools">>,[<<"mix">>]}.
3 3 {<<"description">>,
4 4 <<"HTTP2-compliant wrapper for sending iOS (APNS), Android (FCM),\nand Amazon Android (ADM) push notifications.">>}.
5 - {<<"elixir">>,<<"~> 1.6">>}.
5 + {<<"elixir">>,<<"~> 1.7">>}.
6 6 {<<"files">>,
7 7 [<<"lib">>,<<"lib/pigeon">>,<<"lib/pigeon/adapter.ex">>,
8 8 <<"lib/pigeon/registry.ex">>,<<"lib/pigeon/config_error.ex">>,
  @@ -36,7 +36,7 @@
36 36 {<<"name">>,<<"goth">>},
37 37 {<<"optional">>,false},
38 38 {<<"repository">>,<<"hexpm">>},
39 - {<<"requirement">>,<<"~> 1.3.0-rc.2">>}],
39 + {<<"requirement">>,<<"~> 1.3.0">>}],
40 40 [{<<"app">>,<<"httpoison">>},
41 41 {<<"name">>,<<"httpoison">>},
42 42 {<<"optional">>,false},
  @@ -57,4 +57,4 @@
57 57 {<<"optional">>,false},
58 58 {<<"repository">>,<<"hexpm">>},
59 59 {<<"requirement">>,<<"~> 0.6.0">>}]]}.
60 - {<<"version">>,<<"2.0.0-rc.0">>}.
60 + {<<"version">>,<<"2.0.0-rc.1">>}.
  @@ -53,7 +53,11 @@ defmodule Pigeon do
53 53 | {module, atom}
54 54 | {module, atom, [any]}
55 55
56 - @type notification :: %{__meta__: Pigeon.Metadata.t()}
56 + @type notification :: %{
57 + :__struct__ => atom(),
58 + :__meta__ => Pigeon.Metadata.t(),
59 + optional(atom()) => any()
60 + }
57 61
58 62 @typedoc ~S"""
59 63 Options for sending push notifications.
  @@ -24,13 +24,13 @@ defmodule Pigeon.Adapter do
24 24 end
25 25
26 26 @impl true
27 - def handle_push(%{response: nil} = notification, on_response, _state) do
28 - process_on_response(on_response, %{notification | response: :success})
27 + def handle_push(%{response: nil} = notification, state) do
28 + process_on_response(%{notification | response: :success})
29 29 {:noreply, state}
30 30 end
31 31
32 - def handle_push(notification, on_response, state) do
33 - process_on_response(on_response, notification)
32 + def handle_push(notification, state) do
33 + process_on_response(notification)
34 34 {:noreply, state}
35 35 end
36 36 end
Loading more files…