22 lines
587 B
Python
22 lines
587 B
Python
# retoor <retoor@molodetz.nl>
|
|
from molodetz.docs_api import account, admin, content, join
|
|
from molodetz.docs_api.registry import endpoint, field, substitute
|
|
|
|
|
|
def ordered_groups():
|
|
return [content.GROUP, join.GROUP, account.GROUP, admin.GROUP]
|
|
|
|
|
|
def all_endpoints():
|
|
return [item for group in ordered_groups() for item in group["endpoints"]]
|
|
|
|
|
|
def group_by_slug(slug):
|
|
for group in ordered_groups():
|
|
if group["slug"] == slug:
|
|
return group
|
|
return None
|
|
|
|
|
|
__all__ = ["all_endpoints", "endpoint", "field", "group_by_slug", "ordered_groups", "substitute"]
|