2024-03-22 12:55:25 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Integrations\Lastfm;
|
|
|
|
|
2024-03-22 14:34:13 +00:00
|
|
|
use App\Http\Integrations\Lastfm\Auth\LastfmAuthenticator;
|
2024-03-22 12:55:25 +00:00
|
|
|
use Saloon\Http\Connector;
|
|
|
|
use Saloon\Traits\Plugins\AcceptsJson;
|
|
|
|
|
|
|
|
class LastfmConnector extends Connector
|
|
|
|
{
|
|
|
|
use AcceptsJson;
|
|
|
|
|
|
|
|
public function resolveBaseUrl(): string
|
|
|
|
{
|
|
|
|
return config('koel.lastfm.endpoint');
|
|
|
|
}
|
2024-03-22 14:34:13 +00:00
|
|
|
|
|
|
|
protected function defaultAuth(): LastfmAuthenticator
|
|
|
|
{
|
|
|
|
return new LastfmAuthenticator(config('koel.lastfm.key'), config('koel.lastfm.secret'));
|
|
|
|
}
|
2024-03-22 12:55:25 +00:00
|
|
|
}
|