Class ServerPublisher
HTTP client used to requests on the Maniaplanet Web Services API. Service classes of the SDK extends this base class.
- Maniaplanet\WebServices\HTTPClient
- Maniaplanet\WebServices\ManiaHome\ServerPublisher
Located at libraries/Maniaplanet/WebServices/ManiaHome/ServerPublisher.php
public
|
#
__construct( string $username = null, string $password = null, string $serverLogin = null )
In the class the constructor is a bit different: there is a 3rd param to specify the server login from which the notifications are sent. |
public
integer
|
#
postPublicNotification( string $message, string $link = null, string $iconStyle = null, string $iconSubstyle = null )
Send a public notification to every player that bookmarked your server. |
public
integer
|
#
postPersonalNotification( string $message, string $receiverName, string $link = null, string $iconStyle = null, string $iconSubstyle = null )
Send a public notification to a player (specified in Notification::$receiverName). The message will be prepended with its nickname and will be visible by all its buddies. |
public
integer
|
#
postPrivateNotification( string $message, string $receiverName, string $link = null )
Send a private message to a player (specified in Notification::$receiverName). |
public
integer
|
#
postPrivateEvent( string $message, string|string[] $eventDate, integer $receiverName, string $link = null )
Create an event visible only by the receivers. To create an event for many players just give an array of login as receiverName. |
public
integer
|
#
postPublicEvent( string $message, string $eventDate, integer $link = null )
Create an event visible by all players who bookmarked your server |
execute()
|
VERSION
|
protected
mixed
|
$serverLogin |
|
$APIURL,
$accept,
$contentType,
$enableAuth,
$headers,
$lastException,
$password,
$serializeCallback,
$throwExceptions,
$unserializeCallback,
$username
|