Coder Social home page Coder Social logo

ruby-push's Introduction

push.rb

Use the ruby programming language to handle your Pushover notifications

Gem Requirements

gems

Setup & Usage

API Setup

  • In order to take advantage of this ruby script, you must first set the application token and user key in the config.yaml file:

api_data

Usage

  • The script has ARGV[0] set by default for the message content. This is handled by calling the script, then the argument:

usage

Config.yaml File

  • push.rb relies on the config.yaml file to pull in various parameters, which limits the amount of time spent inside the push.rb script
  • Configure the yaml file with your application token, user key, device name(s), notification sound, etc.
  • By default, the priority & sound dictionaries are set in the push.rb script:

yaml_example1

  • Here, we can select which priority and sound to use (nested items have been marked with their corresponding numbers)

config_snip

Attachments

  • Need to attach an image? Set the image flag to 1, set your image directory path and the type. push.rb will check for the flag, then check the file size before pushing:

attachments (1)

  • then push.rb will encode the image to a Base64 encoding:

b64

Emergency Priority

  • Static Badge

Receipts

  • Static Badge

Message Limits

Message limits are checked after each push with the following request:

requests

opt directory

Contains notification images that can be used as visuals (optional).

Contributing

  1. Fork the main branch
  2. Switch to the dev branch: git checkout dev
  3. Create your feature branch: git checkout -b your-feature-name
  4. Commit your changes: git commit -am 'your added feature'
  5. Push to the branch: git push origin your-feature-name
  6. Create a new Pull Request against the dev repo

ruby-push's People

Contributors

lbhopper avatar

Stargazers

 avatar

Watchers

 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.