Small reorder
This commit is contained in:
parent
af4eb343d7
commit
12636294dd
5
index.py
5
index.py
|
@ -3,11 +3,14 @@ import requests
|
||||||
#Create Windows notification
|
#Create Windows notification
|
||||||
from win10toast import ToastNotifier
|
from win10toast import ToastNotifier
|
||||||
|
|
||||||
filename = 'epic_games.ico'
|
#URL API
|
||||||
url = "https://api.plenusbot.xyz/epic_games?country=IT"
|
url = "https://api.plenusbot.xyz/epic_games?country=IT"
|
||||||
response = requests.get(url).json()
|
response = requests.get(url).json()
|
||||||
# Title of current games
|
# Title of current games
|
||||||
current_games_title = response['currentGames'][0]['title']
|
current_games_title = response['currentGames'][0]['title']
|
||||||
|
|
||||||
|
#Icon file
|
||||||
|
filename = 'epic_games.ico'
|
||||||
|
#Create notification on Windows
|
||||||
toast = ToastNotifier()
|
toast = ToastNotifier()
|
||||||
toast.show_toast(title="New games!", msg="There is a new game on Epic Games Store " + current_games_title , icon_path=filename,duration=10,threaded=False)
|
toast.show_toast(title="New games!", msg="There is a new game on Epic Games Store " + current_games_title , icon_path=filename,duration=10,threaded=False)
|
Loading…
Reference in New Issue