Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
ruby-notify-my-android
Advanced tools
= ruby-notify-my-android
Send notifications to Android devices via the Notify My Android API. Details about the API are available at https://www.notifymyandroid.com/api.php.
== Test Status
{}[https://travis-ci.org/slashk/ruby-notify-my-android]
== Installation
gem install ruby-notify-my-android
== Usage from command line
You can send notifications from the command line with the notify-my-android script:
$ notify-my-android -k 9d0538ab7b52360e906e0e766f34501b69edde92fe3409e9 Notification sent !
Here are the full set of parameters that it accepts:
Usage: notify-my-android [options] -k, --apikey APIKEY Your API Key -p, --priority PRIORITY Priority (-2,-1,0,1,2) -a, --application APPNAME Name of app -e, --event EVENTNAME Name of event -d, --description DESCRIPTION Notify text
Any parameters unset will use default values except --apikey
== Usage as a Gem
Sending a notification via ruby-notify-my-android gem
require 'rubygems' require 'ruby-notify-my-android'
NMA.notify do |n| n.apikey = "9d1538ab7b52360e906e0e766f34501b69edde92fe3409e9" # can also be list such as ["key1", "key2"] n.priority = NMA::Priority::MODERATE n.application = "NMA" n.event = "Notification" n.description = "Your server is under attack!!!" end
== Using the API
There are only a few commands that are available:
The standard API response for a successful call is as follows: #<NMA::Response:0x1059682b8 @body={"success"=>[{"resettimer"=>"59", "code"=>"200", "remaining"=>"798"}]}, @code="200", @raw= "<success code="200" remaining="798" resettimer="59" />\r\n", @response={"resettimer"=>"59", "code"=>"200", "remaining"=>"798"}>
The standard API response for a unsuccessful call is as follows: @body= {"error"=> [{"code"=>"400", "content"=>"Parameter 'apikey' length is invalid."}]}, @code="200", @raw= "<error code="400" >Parameter 'apikey' length is invalid.\r\n", @response={"code"=>"400", "content"=>"Parameter 'apikey' length is invalid."}>
Note that the @code signifies the success or failure of the HTTP call, not the NMA call. Use the @response["code"] for that determination.
== Contributing to ruby-notify-my-android
== Copyright
Written by Ken Pepple
Based on Prowly gem (https://github.com/rafmagana/prowly) by Rafael Magana
See LICENSE.txt for further details.
FAQs
Unknown package
We found that ruby-notify-my-android demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.