/Poshover

A PowerShell module for sending notifications / messages using the Pushover API

Primary LanguagePowerShellMIT LicenseMIT

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Poshover - A PowerShell Module for Pushover

Send push notifications to mobile devices and desktops from PowerShell using the Pushover service!
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

Product Name Screen Shot

If you want to send push notifications to one or more mobile or desktop devices from PowerShell, that's exactly what this module is about. The module makes use of the Pushover.net notification service which is free for up to 10k notifications per month!

The goal of the module is to support as much of the Pushover API as possible. To start with, the messages endpoint is be supported using the Send-Pushover function, and the most common features including message priority, retry interval, expiration, and attachment capabilities are available.

Later, support will be added for additional features like checking receipt status, listing and specifying notification sounds, and other API areas like subscriptions, groups, licensing, etc.

Getting Started

Before you use Poshover and the Pushover API, you need a Pushover account and an application token.

Prerequisites

To use this module, you must have an account on Pushover.net and your own application/api token.

  • Create a Pushover.net account
  • Create an Application and save your token
  • Create a delivery group or acquire one or more user ID's to which notifications should be sent

To clone and develop the module, you should have a handful of PowerShell modules already installed on your development system.

  • psake for build
  • Pester for testing
  • PSScriptAnalyzer for linting

Installation

Launch an elevated PowerShell session and run the following:

Install-Module -Name Poshover -AllowPrerelease

If that failed, you may need to update your PowerShellGet package provider. Try this:

[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
Install-PackageProvider -Name NuGet -Force
Install-Module -Name PowerShellGet -Force
Install-Module -Name Poshover -AllowPrerelease

Usage

Send-Pushover -Token $apikey -User $deliverygroup -Message 'Have a nice day!'

Building

The structure of the PowerShell module is such that the .\src\ directory contains the module manifest, .psm1 file, and all other functions/classes/tests necessary. The "build" process takes the content of the .\src\ directory, copies it to .\output\Poshover\version, and updates the module manifest to ensure all classes and functions are exported properly.

To build, simply run Invoke-psake build from the root of the project. And to test, run Invoke-psake test.

I like to also setup VSCode to launch .\debug.ps1 when I press F5. This will clear the .\output\ directory and call the psake build task, then force-import the updated module from the .\output\ directory. I find this makes the developer "inner-loop" really quick.

Also, I recommend using the Microsoft.Powershell.SecretManagement module for storing your api keys. That way you never enter them in clear text.

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Josh Hendricks - @joshooaj

Project Link: https://github.com/jhendricks123/Poshover

Acknowledgements