Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.17 KB

README.md

File metadata and controls

44 lines (31 loc) · 1.17 KB

phpTriton

A PHP client for the unpublished API for Neptune's Pride II: Triton (https://np.ironhelmet.com/)

Usage

require "phpTriton/client.php";

$client = new TritonClient($alias, $password);
if($client->authenticate()){
    $game = $client->GetGame($game_id);
    $universe = $game->GetFullUniverse();
}

Classes

TritonClient($alias, $password)

  • authenticate() - authenticates the player credentials, return true on success
  • GetGame($game_id) - returns TritonGame object
  • GetServer() - returns TritonServer object

TritonServer($client)

All methods return decoded JSON arrays.

  • GetPlayer() - returns the player information
  • GetOpenGames() - returns the open game information

TritonGame($client, $game_id)

All methods return decoded JSON arrays.

  • GetFullUniverse() - returns game universe information
  • GetIntel() - returns intel statistics
  • GetUnreadCount() - returns unread message counts
  • GetPlayerAchievements() - returns game players achievement information
  • GetDiplomacyMessages($count, $offset = 0) - returns diplomacy messages
  • GetEventMessages($count, $offset = 0) - returns event messages