Created
March 23, 2017 02:31
-
-
Save fpg1503/4be0628072e7b35f202aed5a85497de4 to your computer and use it in GitHub Desktop.
Candle - Programmatically light candles for your AppStore Submissions 🕯
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
| # Install the Python Requests library: | |
| # `pip install requests` | |
| import requests | |
| def light_candle(app_name, version, email="@"): | |
| # Cria Vela | |
| # POST http://www.velavirtual.com.br/asc/CriaVela.asp | |
| message = "Vela para a versão " + version + " do app " + app_name | |
| initials = app_name.upper()[0:10] | |
| try: | |
| response = requests.post( | |
| url="http://www.velavirtual.com.br/asc/CriaVela.asp", | |
| headers={ | |
| "Content-Type": "application/x-www-form-urlencoded; charset=utf-8", | |
| }, | |
| data={ | |
| "Mensagem": message, | |
| "Oracao": message, | |
| "Nome": app_name, | |
| "Email": email, | |
| "Vela": initials, | |
| }, | |
| ) | |
| return response.url | |
| except requests.exceptions.RequestException: | |
| print('HTTP Request failed') | |
| def light_candles(app_name, version, amount, email="@"): | |
| return [light_candle(app_name, version, email) for _ in range(0, amount)] | |
| print(light_candles("Teste", "1.2.3", 3)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment