def api_endpoints(obj):
for name in dir(obj):<EOL><INDENT>attr = getattr(obj, name)<EOL>api_path = getattr(attr, '<STR_LIT>', None)<EOL>if api_path:<EOL><INDENT>yield (<EOL>'<STR_LIT>' % (obj.api_path_prefix, api_path),<EOL>attr,<EOL>)<EOL><DEDENT><DEDENT>for api_provider in obj.api_providers:<EOL><INDENT>for api_path, attr in api_endpoints(api_provider):<EOL><INDENT>yield (api_path, attr)<EOL><DEDENT><DEDENT>
Iterator over all API endpoint names and callbacks.