Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/erniebrodeur/pushover
A gem to interface with pushover.net
https://github.com/erniebrodeur/pushover
api cli pushover pushover-api ruby saas
Last synced: 23 days ago
JSON representation
A gem to interface with pushover.net
- Host: GitHub
- URL: https://github.com/erniebrodeur/pushover
- Owner: erniebrodeur
- License: mit
- Created: 2012-08-25T06:01:56.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2020-08-28T14:19:26.000Z (over 4 years ago)
- Last Synced: 2024-09-23T12:38:41.108Z (3 months ago)
- Topics: api, cli, pushover, pushover-api, ruby, saas
- Language: Ruby
- Homepage: http://erniebrodeur.github.io/pushover/
- Size: 326 KB
- Stars: 64
- Watchers: 5
- Forks: 24
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Pushover
[![Build Status](https://travis-ci.org/erniebrodeur/pushover.svg?branch=master)](https://travis-ci.org/erniebrodeur/pushover) [![codecov](https://codecov.io/gh/erniebrodeur/pushover/branch/master/graph/badge.svg)](https://codecov.io/gh/erniebrodeur/pushover)This gem provides a CLI and an API interface to https://pushover.net.
## Installation
To install:
gem install pushover
To use inside of an application, add this to the your gemfile:
gem 'pushover'
and run bundle to make it available:
bundle
## Usage
For now, not much is supported on the CLI.
Sending a message:
pushover --token=your_app_token --user=user_key message here we go again, on my own.
pushover -tyour_app_token -uuser_key message here we go again, on my own.Getting receipt details:
pushover -tyour_app_token receipt receipt-hash
Currently unsupported message features:
- attachments
- callbacks
- setting timestamp### Api
``` ruby
require 'pushover'### message
message = Pushover::Message.new(token: 'token', user: 'user_key', message: '...')
message.push### Receipt
Pushover::Message.new(token: 'token', user: 'user_key', message: '...', 'priority': 2, expire: 1, retry: 60).pushreceipt = Pushover::Receipt.new(receipt: "receipt", token: 'token')
receipt.get### Responses
response = Pushover::Message.new(token: 'token', user: 'user_key', message: '...').push# the below data is populated from the response
puts response.status # return the status of the request, 0 or 1
puts response.request # uuid of the request
puts response.errors # array of errors (if any)
puts response.receipt # receipt (if requested)
puts response.headers # response headers (includes limits)
puts response.attributes # any other k/v pair returned from pushover
```## Contributing
1. Fork it
2. Switch to development (`git checkout development`)
3. Create your feature branch (`git checkout -b my-new-feature`)
4. Commit your changes (`git commit -am 'Added some feature'`)
5. Push to the branch (`git push origin my-new-feature`)
6. Create new Pull Request against `development`