Discord - (platform\discord.class.php)

vor dem Login

static platform\discord::getAuthorizationUrl ([$string $state = null])
$state optional; gibt ein individuellen Key an
gibt eine URL als string zurück, wo man sich über Discord identifizieren kann
echo '<a href='.platform\discord::getAuthorizationUrl().'>Mit Discord anmelden</a>';

nach dem Login - REDIRECT URL

static platform\discord::getAuthorizationInfo ()
gibt ein array mit Informationen von Discord zurück ['code' => #IDENTCODE, 'scope' => #SCOPE, 'state' => #INDIVIDUELLER KEY]; im Fehlerfall wird null zurückgegeben
// URL Redirect Site

platform\discord::getAuthorizationInfo();
static platform\discord::getToken ()
gibt ein array mit Informationen (Token) von Discord zurück ['access_token' => #TOKEN, 'expires_in' => #EXPIRE IN SEC, 'refresh_token' => #REFRESH TOKEN, 'scope' => #SCOPE, 'token_type' => 'bearer']; im Fehlerfall wird null zurückgegeben
// URL Redirect Site

platform\discord::getToken();
static platform\discord::getUserInfo ()
gibt ein array mit Informationen über den Nutzer von Discord zurück (eMail, Bild, etc.); im Fehlerfall wird null zurückgegeben
// URL Redirect Site

platform\discord::getUserInfo();