App\Http\Controllers\API\LegacyController::getScores PHP Method

getScores() public method

public getScores ( )
    public function getScores()
    {
        $limit = min((int) Request::input('limit', 50), 100);
        $beatmap_id = Request::input('b');
        $mods = Request::input('mods');
        if (present($beatmap_id)) {
            $scores = $this->_getScores(true, $limit)->with('user')->where('beatmap_id', $beatmap_id);
            if (present($mods)) {
                $scores = $scores->where('enabled_mods', $mods);
            }
        } else {
            $scores = null;
        }
        return $this->_transformScores($scores->orderBy('score', 'desc'), false);
    }