Advertisement
Guest User

Untitled

a guest
Jul 21st, 2021
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. # Description: mc netdata python.d module
  3.  
  4. import json
  5.  
  6. # Update only every 5 seconds because collection takes in excess of
  7. # 100ms sometimes, and most people won't care about second-by-second data.
  8. update_every = 5
  9.  
  10. ORDER = [
  11. 'players',
  12. ]
  13.  
  14. CHARTS = {
  15. 'players': {
  16. 'options': [None, 'Minecraft Users', 'users'],
  17. 'lines': [
  18. ['players', 'Users', 'absolute', 1, 1]
  19. ]
  20. }
  21. }
  22.  
  23. def test():
  24. import requests
  25. url = 'https://api.minetools.eu/ping/hypixel.net'
  26. data = requests.get(url).json()
  27. print(data)
  28.  
  29. if __name__ == '__main__':
  30. test()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement