mirror of
https://github.com/Minejerik/nimsrvstat
synced 2026-01-14 05:32:05 +00:00
No description
| src | ||
| tests | ||
| .gitignore | ||
| example.nim | ||
| nimsrvstat.nimble | ||
| README.md | ||
nimsrvstat
A nim wrapper around the mcsrvstat api
Usage
Here is some example code of it getting, and saving, the icon of a server:
import nimsrvstat
import std/options
# Create server instance
var server = Server(
address: "hypixel.net",
platform: Java
)
# Gets the data for the server (required to use anything)
server.getData
# Check if the icon exists
# If it does write it to a file.
if server.icon().isSome():
writeFile("icon.png", server.icon().get())