2017 © Pedro Peláez
 

library nitrado-api

This is a PHP 5.3 library for the unofficial Nitrado.net gameserver API

image

tyrola/nitrado-api

This is a PHP 5.3 library for the unofficial Nitrado.net gameserver API

  • Wednesday, May 20, 2015
  • by BirknerAlex
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Unofficial NitradoAPI

This is a PHP 5.3 library for the unofficial Nitrado.net gameserver API. This API is normally used for the smartphone apps., (*1)

Note: There is no support for this library from nitrado.net. Use at your own risk., (*2)

Note 2: This library currently only supports the product type "Gameserver"., (*3)

Note 3: Deprecated! You should use the official SDK https://github.com/nitrado/Nitrapi-PHP., (*4)

Recommends

  • PHP 5.3 or higher
  • An nitrado.net User Account
  • Composer.phar ;)

Installation

Edit the composer.json and execute composer.phar update ``` php { "require": { "tyrola/nitrado-api": "dev-master", } }, (*5)


All Methods ----------- **All Methods for every product type** * getId() * getDeleteDate() * setEndDate() * getProduct() * getType() **All Methods for the "Gameserver" product type** * getCpuUsage() * getCurrentMap() * getCurrentPlayers() * getIp() * getMaxPlayers() * getServerName() * getStatus() * doRestart() * doStop() * doStart() Examples -------- **Using the API** ``` php <?php use at\Tyrola\Nitrado\Api\NitradoApi; require_once "vendor/autoload.php"; //Composer autoloader $nitrado = new NitradoApi("username", "yourPassword"); //Your api calls....

Get a list with all services ``` php <?php, (*6)

// see "Using the API" $nitrado->getServiceIds(); //array with service ids, (*7)


**Getting a specific Service object by service id** ``` php <?php // see "Using the API" $service = $nitrado->getService($id); //Service object

Restart a Gameserver ``` php <?php, (*8)

// see "Using the API" $service = $nitrado->getService($id); //Service object, (*9)

$service->doRestart(); //bool, (*10)

```, (*11)

The Versions

20/05 2015

dev-master

9999999-dev https://github.com/BirknerAlex/NitradoApi

This is a PHP 5.3 library for the unofficial Nitrado.net gameserver API

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.3.0

 

by Avatar BirknerAlex

api nitrado