Skip to content

Elixir application for sending notifications to Prowl (https://www.prowlapp.com)

License

Notifications You must be signed in to change notification settings

jeregrine/elixir-prowl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prowl

Elixir application for sending notifications to Prowl.

Installation

The package can be installed by following these steps:

  1. Add prowl to your list of dependencies in mix.exs:
        def deps do
          [{:prowl, "~> 0.1.0"}]
        end
  1. Set your API key in your config.exs:
        config :prowl, apikey: "your api key"
  1. Ensure prowl is started before your application:
        def application do
          [applications: [:prowl]]
        end

Usage

iex> Prowl.notify(application, event, description, priority \\ 0, url \\ "")
{:ok, 988}

Sends a notification with the parameters given. Successful responses will come in the format above, where 988 is the number of api calls you have left (at the time of writing Prowl sets a limit of 1000 per hour).

The optional field priority can range from -2 to 2.

An optional URL can also be provided for the Prowl app to use to trigger a redirect.

Errors

iex> Prowl.notify(application, event, description, priority, url)
{:error, {error_code, error_message}}

If the API returns an error then the response will come in the format above. A list of possible error codes is given in the full API documentation.

Full API Documentation

About

Elixir application for sending notifications to Prowl (https://www.prowlapp.com)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 100.0%