first commit
This commit is contained in:
commit
788cf3e917
47 changed files with 2007 additions and 0 deletions
27
app/Discord/Token.php
Normal file
27
app/Discord/Token.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?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();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue