Git Product home page Git Product logo

ps-pushover's Introduction

PS-Pushover

A PowerShell module to send messages over the Pushover API

Requires: PowerShell 3.0

Install

To get up and running using the module run the following

<#
    .SYNOPSIS
    Simple install script for PS-Pushover
#>

$moduleName = "PS-Pushover"
$branch = "master"
$urlStub = "https://raw.github.com/Kieranties/$moduleName/$branch/"
$psm = "$urlStub$moduleName.psm1"

$client = New-Object System.Net.WebClient
$modPath = $env:PSModulePath.Split(";") | ? { $_ } | select -First 1 # or wherever you put your modules
$modFolder = New-Item (Join-Path $modPath $moduleName) -ItemType directory -Force # force used so you can use same script to update

$psm | % {
    $fileName = Split-Path $_ -leaf
    $client.DownloadFile($_, (Join-Path $modFolder $filename))
}

"$moduleName install complete"

Setup

You'll need to do the following before making use of the module

Create a Pushover Application

  • Visit the new application page and create an application for yourself
  • Take note of the API Token/Key
  • Visit the Pushover homepage
  • Take note of your User Key

(Optional) Setting session parameters in profile

The function Send-PushoverMessage (aliased to spm) allows all parameters to be passed in each call. If you're going to be using the function often, it's easier to set things once.

In your profile you can do the following:

	Import-Module PS-Pushover
	Set-PushoverSession -token <your API Token> -user <your User Key>

Other options are also available, call Set-PushoverSession -detailed for more information

Functions

The full list of functions available are:

  • Get-PushoverPriorities - Returns a list of valid priorities for use in sending messages
  • Get-PushoverSession - Returns details of the properties set for the current powershell session
  • Get-PushoverSounds - Returns a list of valid sounds for use in sending messages
  • Send-PushoverMessage - Sends a message using the Pushover API
  • Set-PushoverSession - Sets properties for use throughout the current powershell session

Examples

Some gist examples are available


Links

ps-pushover's People

Contributors

gjermshus avatar kieranties avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.