. * */ namespace Friendica\Object\Api\Mastodon; use Friendica\BaseDataTransferObject; /** * Class Token * * @see https://docs.joinmastodon.org/entities/token/ */ class Token extends BaseDataTransferObject { /** @var string */ protected $access_token; /** @var string */ protected $token_type; /** @var string */ protected $scope; /** @var int (timestamp) */ protected $created_at; /** * Creates a token record * * @param string $access_token * @param string $token_type * @param string $scope * @param string $created_at */ public function __construct(string $access_token, string $token_type, string $scope, string $created_at) { $this->access_token = $access_token; $this->token_type = $token_type; $this->scope = $scope; $this->created_at = strtotime($created_at); } }