def register_resources(resources, conf):
    "Add existing resources as API resources."
    for res in resources:
        if 'endpoint' in res:
            schema = conf['schema']
            schema.update(res['fields'])
            register_resource(res['endpoint'], schema, conf['source'],
                              {conf['key']: res[conf['key']]})
dataset/ETHPy150Open taarifa/TaarifaAPI/taarifa_api/taarifa_api.py/register_resources/original