PHP Класс WebsiteAPI, Halite

Наследование: extends API
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( $request )

Защищенные методы

Метод Описание
announcement ( ) * Announcement Endpoint
botFile ( ) * Bot File Endpoint
email ( ) * Email Endpoint
emailList ( ) * Email List Endpoint
errorLog ( ) * Error Log Endpoint
forums ( ) * Forums Endpoint
game ( ) * Game Endpoint
history ( ) * User History Endpoint
notification ( ) * User Notification Endpoint
session ( ) * Session Endpoint
stats ( ) * Stats endpoint
user ( ) * User Endpoint
worker ( ) * Worker Endpoint

Приватные методы

Метод Описание
getForumsID ( $userID ) Gets the id of one of our users in the discourse forums system
getLoggedInUser ( )
getOrganizationForEmail ( $email )
getUsers ( $query, $privateInfo = false )
isLoggedIn ( )
logOutForums ( $forumsID ) Log a users out of forums.halite.io
sanitizeHTTPParameters ( ) * Apply MYSQL sanitization to all incoming parameters

Описание методов

__construct() публичный Метод

public __construct ( $request )

announcement() защищенный Метод

Annoucements are used as 'news blasts' without requiring email. An alert with the annoucement's body and header is showed to users. Once it has been closed, it is never shown to that user again
protected announcement ( )

botFile() защищенный Метод

Handles the user's submission of a new bot
protected botFile ( )

email() защищенный Метод

Hitting this endpoint allows a user to handle the choosing of their email.
protected email ( )

emailList() защищенный Метод

Hitting this endpoint allows a user to subscribe and unsubscribe from all Halite emails.
protected emailList ( )

errorLog() защищенный Метод

When a users times-out or errors during a game of Halite on our server, we store their stdout and stderr output and make it available to them. Users may only see **their** error logs.
protected errorLog ( )

forums() защищенный Метод

Handle the Discourse forums (forums.halite.io) single sign on authentication.
protected forums ( )

game() защищенный Метод

Games are continuously run on our servers and exposed on our website
protected game ( )

history() защищенный Метод

We store the a history of user's bot submissions. This mitigates the 'stealth' submission problem, where users submit a bot, wait for their rank to stabilize, and take it down for the sake of secrecy.
protected history ( )

notification() защищенный Метод

Allows the downloading of all of the notifications a user has recieved over email. Notifications include "Compilation Success", "Bot received", etc
protected notification ( )

session() защищенный Метод

Encapsulates the logged in user's info
protected session ( )

stats() защищенный Метод

Provides a number of statistics about the competition, which would be expensive or impossible to determine using our generic endpoints.
protected stats ( )

user() защищенный Метод

Encapsulates user information.
protected user ( )

worker() защищенный Метод

Bots are compiled and run in games by a decentralized network of 'worker' servers. A few stats about each worker are recorded by our 'manager' server. These stats are exposed on our status page.
protected worker ( )