mirror of
https://github.com/assenzostefano/notify-game-epicgames.git
synced 2025-02-18 04:20:41 +01:00
The message appears on Windows but cannot find the image
This commit is contained in:
parent
4065d236e4
commit
f2d83f1295
BIN
epicgames.png
Normal file
BIN
epicgames.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
11
index.py
11
index.py
@ -1,3 +1,12 @@
|
|||||||
|
#Every 10s check if there are new games
|
||||||
|
import requests
|
||||||
|
#Libraries for Windows notification
|
||||||
from win10toast import ToastNotifier
|
from win10toast import ToastNotifier
|
||||||
|
|
||||||
|
url = "https://api.plenusbot.xyz/epic_games?country=IT"
|
||||||
|
response = requests.get(url).json()
|
||||||
|
# Title of current games
|
||||||
|
current_games = response['currentGames'][0]['title']
|
||||||
|
|
||||||
toaster = ToastNotifier()
|
toaster = ToastNotifier()
|
||||||
toaster.show_toast("Sample Notification","Python is awesome!!!")
|
toaster.show_toast("New free game on the Epic Games Store:", current_games, icon_path="epicgames.png")
|
Loading…
x
Reference in New Issue
Block a user