public function getUserByUsername($username)
    {
        if (!$this->apiVersionIsGreaterThanV3()) {
            throw new EndpointNotSupportedByApiVersionException();
        }

        $params = [
            'login' => $username,
        ];

        return $this->get('users', $params);
    }