Skip to content

mjlomeli/Nitrado-SDK

Repository files navigation

Nitrado SDK   Python

Testing

A Python based SDK for the Nitrado RESTful API published at PyPI.


Installation

In your terminal install the nitrado package with pip.

pip install nitrado

Overview

To have access to this application you must have an account created at Nitrado and create an API key.

Table of contents

Shows how to get access to your API key.

Shows how to log in to the client and use the basic code interface

Basic requests from Nitrado for health and maintenance checks.

Data provided outside of the game server. Like server status, user id, and auto extension plan.

Data directly related to the game server. This includes the player list, game settings, etc.

Custom game specific libraries.



Examples

The basic maintanance tools from Nitrado API.

from nitrado import Global

version = Global.version()
print(version)

'nitrapi-1201-wh2h4'

This example highlights how to get the service.

from nitrado import Service

services = Service.all()
print(services)
[
    <Service(id=1011111, status='active', type_human='Publicserver 10 slots', suspend_date='2023-05-07T01:21:11')>,
    <Service(id=1022222, status='active', type_human='Publicserver 20 slots', suspend_date='2023-07-07T02:11:01')>,
    <Service(id=1033333, status='active', type_human='Publicserver 30 slots', suspend_date='2023-09-07T06:51:41')>
]

This example highlights how to get the gameserver.

from nitrado import GameServer

gameservers = GameServer.all()
print(gameservers)
[
    <GameServer(service_id=11111111, location='US', slots=10, ip='1.2.3.4', game_human='ARK: Survival Evolved (Xbox One)')>,
    <GameServer(service_id=22222222, location='US', slots=70, ip='11.22.33.44', game_human='ARK: Survival Evolved (Xbox One)')>
]

About

A client to access the Nitrado API with Python

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors