v2.0.0
2.0.0 (2018-04-24)
⚠ BREAKING CHANGES
-
Namespace changed from
Votifier\ClienttoD3strukt0r\VotifierClient(withServerType\andVoteType\sub-namespaces). Update everyusestatement. -
The single
Voteclass with a six-argument constructor was removed. You now compose a server type, a vote type and aVotewrapper, then callsend():// before (1.x) use Votifier\Client\Vote; (new Vote('127.0.0.1', 8192, $publicKey, $username, 'My list', $ip))->send(); // after (2.0.0) use D3strukt0r\VotifierClient\ServerType\ClassicVotifier; use D3strukt0r\VotifierClient\VoteType\ClassicVote; use D3strukt0r\VotifierClient\Vote; $serverType = new ClassicVotifier('127.0.0.1', null, $publicKey); // null port defaults to 8192 $voteType = new ClassicVote($username, 'My list', $ip); (new Vote($voteType, $serverType))->send();
-
NuVotifier is now supported via
ServerType\NuVotifier($host, $port, $publicKey, $protocolV2 = false, $token = null)— passtrueand a token for the v2 protocol. -
Sending still throws a generic
\Exceptionon failure (typed exceptions arrive in 3.0.0).