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
| import urllib, urllib2, base64 | |
| team_name = 'My Pager.io Team Name' | |
| api_key = 'My Pager.io API Key' | |
| alert_subject = 'Test Alert' | |
| alert_message = 'This is where you would put a longer alert message' | |
| data = {'subject': alert_subject, 'message': alert_message} | |
| base64string = base64.encodestring('%s:%s' % (team_name, api_key)).replace('\n', '') |
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
| import base64 | |
| header = 'Basic ' + base64.b64encode('pager.io:1234567890') | |
| print header | |
| 'Basic cGFnZXIuaW86MTIzNDU2Nzg5MA==' |
NewerOlder