GithubHelp home page GithubHelp logo

poshover's People

Contributors

joshooaj avatar milestone-jh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

devmuppet

poshover's Issues

Add support for retrieving and using notification sounds

Pushover supports a number of different notification sounds. They have an API for retrieving them, and there's an optional messages parameter to specify the desired sound. This could be used to differentiate between different types of notifications or priorities.

Add receipt handling functions

I want to take an emergency message receipt and check the state of that message using the receipt. Has it been acknowledged? When and by who?

I might want to have a Wait-PushoverAcknowledgement -Receipt $receipt which blocks until the receipt is acknowledged or it expires.

Add a way to set a default user or named user tokens

It might be nice to be able to set a default user/group id so that if you also have a default application token, you could simply use Send-Pushover -Message 'funny business' and the token/user parameters would be applied implicitly.

And if you could set a friendly name for different user/group IDs, you could do Send-Pushover -User Oncall and the actual ID for the user/group would be resolved in the background by reading it in from an encrypted configuration file.

Token and User keys are leaked in Verbose output

Verbose output includes the HTTP request message body and the token & user values are both leaked in Verbose output. Since the current design is using securestring to protect these values both in the terminal and on disk, it doesn't make sense to let these values leak in verbose output.

One might consider the message body to be unneeded in verbose output, so we could remove the Write-Verbose all together. However, for troubleshooting purposes it can be very valuable to see HTTP request body since it can be challenging to see it in a network trace against an HTTPS endpoint. So my preference is to replace the values with the * symbol before the call to Write-Verbose.

Add Set-PushoverDefaultToken

Function name is just a working name. The idea is that if you have a default application API token set, you could call Send-Pushover without a token.

The token should be encrypted and saved to disk, probably under the appdata folder. Use ConvertFrom-SecureString or use the .net dpapi classes directly using CurrentUser scope.

If no default is set, an error is thrown when using Send-Pushover without a token.

Implement PlatyPS for documentation

I recently heard about PlatyPS for doing help documentation in markdown syntax. Haven't used it yet but this seems like a great project to try it out on. This would help declutter the functions as well which I appreciate.

Accept a file path in addition to a byte array for the image attachment

Is your feature request related to a problem? Please describe.
When an image is in a file on the filesystem, you currently have to read that file into a byte array before providing it in the Attachment parameter of Send-Pushover.

Describe the solution you'd like
I want to be able to either pass a byte array or a file path. If a file is on disk, it would save a step before sending the notification.

Refactor API response error handling

Right now the functions sending HTTP requests each have their own HTTP response handling where we check for an exception on the Invoke-RestMethod and pull out the API response if it's buried in the exception, and then we process the response to see if it was successful, and if not, we generate an error.

All that response handling makes these functions longer than necessary and is duplicate code. I'd like to see the responses be handled uniformly by a private function before we go down the happy path of extracting whatever information was needed from the response in that particular function.

Add support for user/group validation

The user may want to verify the user ID they are sending a message to is valid and Pushover provides an API for this.

Add a function like Test-PushoverUser which takes the user ID and optionally a device name, and tests whether that user is valid.

The user may want a simple boolean result, or they may want to see a detailed response including an error message if available, and whether the user ID is for a group.

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.