def METHOD_NAME(self, endpoints, base, api, uriParameters=None):
    if uriParameters is None:
        uriParameters = OrderedDict()
    for k, v in api.items():
        if k.startswith("/"):
            ep = base + k
            p = copy.deepcopy(uriParameters)
            if v is not None:
                p.update(v.get("uriParameters", {}))
                v["uriParameters"] = p
                endpoints[ep] = v
            self.METHOD_NAME(endpoints, ep, v, p)
        elif k in ['get', 'post']:
            if 'is' not in v:
                continue
            for _is in v['is']:
                if not isinstance(_is, dict):
                    raise RuntimeError(f'Unexpected "is" target {type(_is)}: {_is}')
                if 'bbget' in _is:
                    try:
                        v['eptype'] = _is['bbget']['bbtype']
                    except TypeError as e:
                        raise RuntimeError(f"Unexpected 'is' target {_is['bbget']}") from e
                    self.endpoints_by_type.setdefault(v['eptype'], {})
                    self.endpoints_by_type[v['eptype']][base] = api
                if 'bbgetraw' in _is:
                    self.rawendpoints.setdefault(base, {})
                    self.rawendpoints[base] = api
    return endpoints