mirror of
https://github.com/koel/koel
synced 2024-12-26 04:23:05 +00:00
31 lines
673 B
PHP
31 lines
673 B
PHP
<?php
|
|
|
|
namespace App\Http\Integrations\Lastfm\Requests;
|
|
|
|
use App\Http\Integrations\Lastfm\Contracts\RequiresSignature;
|
|
use Saloon\Enums\Method;
|
|
use Saloon\Http\Request;
|
|
|
|
final class GetSessionKeyRequest extends Request implements RequiresSignature
|
|
{
|
|
protected Method $method = Method::GET;
|
|
|
|
public function __construct(private string $token)
|
|
{
|
|
}
|
|
|
|
public function resolveEndpoint(): string
|
|
{
|
|
return '/';
|
|
}
|
|
|
|
/** @return array<mixed> */
|
|
protected function defaultQuery(): array
|
|
{
|
|
return [
|
|
'method' => 'auth.getSession',
|
|
'token' => $this->token,
|
|
'format' => 'json',
|
|
];
|
|
}
|
|
}
|