src/MultiLanguageWrapper/Route/EpisodesRouteLanguageFallback.php
public function getClosureById(int $episodeId): Closure
    {
        return function ($language) use ($episodeId) {
            $json = $this->parent->performAPICallWithJsonResponse(
                'get',
                '/episodes/'.$episodeId,
                [
                    'headers' => ['Accept-Language' => $language]
                ]
            );
            return DataParser::parseData($json, Episode::class);
        };
    }
public function getClosureById(int $episodeId): Closure
    {
        return function ($language) use ($episodeId) {
            $json = $this->parent->performAPICallWithJsonResponse(
                'get',
                '/episodes/'.$episodeId,
                [
                    'headers' => ['Accept-Language' => $language]
                ]
            );
            return DataParser::parseData($json, Episode::class);
        };
    }
public function getClosureById ( int $ episodeId ) : Closure { return function ( $ language ) use ( $ episodeId ) { $ json = $ this -> parent -> performAPICallWithJsonResponse ( 'get' , '/episodes/' . $ episodeId , [ 'headers' => [ 'Accept-Language' => $ language ] ] ) ; return DataParser :: parseData ( $ json , Episode :: class ) ; } ; }
Returns the closure used to fetch an episode by id
for a single language.

@param int $episodeId The episode to fetch.

@return Closure
Returns the closure used to fetch an episode by id for a single language .