38 lines
820 B
PHP
38 lines
820 B
PHP
<?php
|
|
|
|
namespace App\Srgssr;
|
|
|
|
use Illuminate\Support\Facades\Http;
|
|
use App\Srgssr\Api;
|
|
|
|
class Video extends Api
|
|
{
|
|
|
|
public function __construct()
|
|
{
|
|
$this->endpoint = 'https://api.srgssr.ch/videometadata/v2/';
|
|
parent::__construct();
|
|
}
|
|
|
|
public function latestArenaEpisodes()
|
|
{
|
|
$response = Http::withHeaders($this->headers)->withQueryParameters([
|
|
'bu' => 'srf',
|
|
])->get($this->endpoint.'latest_episodes/shows/09784065-687b-4b60-bd23-9ed0d2d43cdc');
|
|
|
|
return $response->json();
|
|
|
|
}
|
|
|
|
public function mediaComposition(string $videoId){
|
|
|
|
$response = Http::withHeaders($this->headers)->withQueryParameters([
|
|
'bu' => 'srf',
|
|
])->get($this->endpoint.$videoId.'/mediaComposition');
|
|
|
|
return $response->json();
|
|
|
|
}
|
|
|
|
}
|