This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Derived from https://gist.github.com/dend/5ae8a70678e3a35d02ecd39c12f99110 | |
| # Added priority parameter. | |
| function Show-Notification { | |
| [cmdletbinding()] | |
| Param ( | |
| [string] | |
| $ToastTitle, | |
| [string] | |
| [parameter(ValueFromPipeline)] | |
| $ToastText, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local token = os.getenv('qtbot_token') | |
| local cat_api_key = os.getenv('cat_api_key') -- https://thecatapi.com/ | |
| local https = require('ssl.https') | |
| local json = require('dkjson') | |
| local bindings = require('bindings').set_token(token) -- https://github.com/topkecleon/bindings | |
| local cat_api_url = 'https://api.thecatapi.com/api/images/get?format=json&type=jpg&api_key=' | |
| local offset = 0 | |
| while true do | |
| local success, result = bindings.getUpdates{ | |
| timeout = 60, |