def load_controllers(self): from r2.controllers.api_docs import api_section, section_info api_section["live"] = "live" section_info["live"] = { "title": "live threads", "description": sys.modules[__name__].__doc__, } from r2.models.token import OAuth2Scope OAuth2Scope.scope_info["livemanage"] = { "id": "livemanage", "name": N_("Manage live threads"), "description": N_("Manage settings and contributors of live threads " "I contribute to."), } from reddit_liveupdate.controllers import ( controller_hooks, LiveUpdateByIDController, LiveUpdateController, LiveUpdateEventsController, LiveUpdatePixelController, ) from r2.config.templates import api from r2.lib.jsontemplates import ListingJsonTemplate from reddit_liveupdate import pages api('liveupdateeventapp', pages.LiveUpdateEventAppJsonTemplate) api('liveupdatefocusapp', pages.LiveUpdateEventAppJsonTemplate) api('liveupdateevent', pages.LiveUpdateEventJsonTemplate) api('liveupdatereportedeventrow', pages.LiveUpdateEventJsonTemplate) api('liveupdatefeaturedevent', pages.LiveUpdateFeaturedEventJsonTemplate) api('liveupdate', pages.LiveUpdateJsonTemplate) api('liveupdatecontributortableitem', pages.ContributorTableItemJsonTemplate) api('liveupdatediscussionslisting', ListingJsonTemplate) controller_hooks.register_all() from reddit_liveupdate import scraper scraper.hooks.register_all()
def load_controllers(self): from r2.controllers.api_docs import api_section, section_info api_section["live"] = "live" section_info["live"] = { "title": "live threads", "description": sys.modules[__name__].__doc__, } from r2.models.token import OAuth2Scope OAuth2Scope.scope_info["livemanage"] = { "id": "livemanage", "name": N_("Manage live threads"), "description": N_("Manage settings and contributors of live threads " "I contribute to."), } from reddit_liveupdate.controllers import ( controller_hooks, LiveUpdateByIDController, LiveUpdateController, LiveUpdateEventsController, LiveUpdatePixelController, ) from r2.config.templates import api from reddit_liveupdate import pages api('liveupdateeventapp', pages.LiveUpdateEventAppJsonTemplate) api('liveupdatefocusapp', pages.LiveUpdateEventAppJsonTemplate) api('liveupdateevent', pages.LiveUpdateEventJsonTemplate) api('liveupdatereportedeventrow', pages.LiveUpdateEventJsonTemplate) api('liveupdate', pages.LiveUpdateJsonTemplate) api('liveupdatecontributortableitem', pages.ContributorTableItemJsonTemplate) controller_hooks.register_all() from reddit_liveupdate import scraper scraper.hooks.register_all()