27 lines
622 B
PHP
27 lines
622 B
PHP
<?php
|
|
|
|
namespace MingTsay\Akanyan\Discord;
|
|
|
|
use stdClass;
|
|
|
|
class Token extends stdClass
|
|
{
|
|
public string $access_token;
|
|
public string $token_type;
|
|
public int $expires_in;
|
|
public string $refresh_token;
|
|
public string $scope;
|
|
|
|
public int $timestamp;
|
|
|
|
public function __construct(stdClass $payload)
|
|
{
|
|
$this->access_token = $payload->access_token;
|
|
$this->token_type = $payload->token_type;
|
|
$this->expires_in = $payload->expires_in;
|
|
$this->refresh_token = $payload->refresh_token;
|
|
$this->scope = $payload->scope;
|
|
|
|
$this->timestamp = time();
|
|
}
|
|
}
|