Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andsve/pushover-lua
Simple Pushover (https://pushover.net) API wrapper/snippet in Lua.
https://github.com/andsve/pushover-lua
Last synced: about 1 month ago
JSON representation
Simple Pushover (https://pushover.net) API wrapper/snippet in Lua.
- Host: GitHub
- URL: https://github.com/andsve/pushover-lua
- Owner: andsve
- Created: 2012-12-16T14:25:10.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2019-04-02T09:16:41.000Z (over 5 years ago)
- Last Synced: 2024-11-05T05:33:52.319Z (about 2 months ago)
- Language: Lua
- Homepage:
- Size: 109 KB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-starred-test - andsve/pushover-lua - Simple Pushover (https://pushover.net) API wrapper/snippet in Lua. (Lua)
README
pushover-lua
============Simple Pushover (https://pushover.net) API wrapper/snippet in Lua.
Usage
=====
```lua
require("pushover")-- setup the three required fields of the request table:
local request = { token = "APP_TOKEN", -- your application's API token
user = "USER_KEY", -- the user key of your user, viewable when logged into the dashboard
message = "Hello World!" -- your message
}-- Some optional parameters may be included: device, title, url, url_title, priority, timestamp, sound
-- Read more about the parameters on: https://pushover.net/api-- send the request, don't forget to check the return values
local success, err = pushover( request )if (success) then
print("Yay the push was sent!")
else
print("Nay, the push failed with error: " .. err)
end
```
`success` will be `true` on a successfull pushover response, and `false` in case of an error. (`err` will also be set in this case.)Dependencies
============
* LuaSocket - http://w3.impa.br/~diego/software/luasocket/
* luasec - https://github.com/brunoos/luasec/License
=======
Public domain, use anyway you want.