Exemplo n.º 1
0
def get_apiv2_handlers(base):
    """Return api v2 handlers."""
    return [

        # Order: Most specific to most generic

        # /api/v2/providers
        ProvidersHandler.create_app_handler(base),

        # /api/v2/history/tvdb1234/episode
        EpisodeHistoryHandler.create_app_handler(base),

        # /api/v2/history
        HistoryHandler.create_app_handler(base),

        # /api/v2/search
        SearchHandler.create_app_handler(base),

        # /api/v2/series/tvdb1234/episode
        EpisodeHandler.create_app_handler(base),

        # /api/v2/series/tvdb1234/operation
        SeriesOperationHandler.create_app_handler(base),
        # /api/v2/series/tvdb1234/asset
        SeriesAssetHandler.create_app_handler(base),
        # /api/v2/series/tvdb1234/legacy
        SeriesLegacyHandler.create_app_handler(base),  # To be removed
        # /api/v2/series/tvdb1234
        SeriesHandler.create_app_handler(base),

        # /api/v2/config
        ConfigHandler.create_app_handler(base),

        # /api/v2/stats
        StatsHandler.create_app_handler(base),

        # /api/v2/internal
        InternalHandler.create_app_handler(base),

        # /api/v2/log
        LogHandler.create_app_handler(base),

        # /api/v2/alias-source/xem/operation
        AliasSourceOperationHandler.create_app_handler(base),
        # /api/v2/alias-source
        AliasSourceHandler.create_app_handler(base),

        # /api/v2/alias
        AliasHandler.create_app_handler(base),

        # /api/v2/system
        SystemHandler.create_app_handler(base),

        # /api/v2/authenticate
        AuthHandler.create_app_handler(base),

        # Always keep this last!
        NotFoundHandler.create_app_handler(base)
    ]
Exemplo n.º 2
0
def get_apiv2_handlers(base):
    """Return api v2 handlers."""
    return [

        # Order: Most specific to most generic
        # /api/v2/postprocess
        PostProcessHandler.create_app_handler(base),

        # /api/v2/providers
        ProvidersHandler.create_app_handler(base),

        # /api/v2/history/tvdb1234/episode
        EpisodeHistoryHandler.create_app_handler(base),

        # /api/v2/notifications
        NotificationsHandler.create_app_handler(base),

        # /api/v2/schedule
        ScheduleHandler.create_app_handler(base),

        # /api/v2/history
        HistoryHandler.create_app_handler(base),

        # /api/v2/search
        SearchHandler.create_app_handler(base),

        # /api/v2/guessit
        GuessitHandler.create_app_handler(base),

        # /api/v2/series/tvdb1234/episode
        EpisodeHandler.create_app_handler(base),

        # /api/v2/massedit
        SeriesMassEdit.create_app_handler(base),
        # /api/v2/massupdate
        SeriesMassOperation.create_app_handler(base),

        # /api/v2/series/changeindexer
        SeriesChangeIndexer.create_app_handler(base),
        # /api/v2/series/tvdb1234/operation
        SeriesOperationHandler.create_app_handler(base),
        # /api/v2/series/tvdb1234/asset
        SeriesAssetHandler.create_app_handler(base),
        # /api/v2/series/tvdb1234/legacy
        SeriesLegacyHandler.create_app_handler(base),  # To be removed
        # /api/v2/series/tvdb1234
        SeriesHandler.create_app_handler(base),

        # /api/v2/config
        ConfigHandler.create_app_handler(base),

        # /api/v2/stats
        StatsHandler.create_app_handler(base),

        # /api/v2/internal
        InternalHandler.create_app_handler(base),

        # /api/v2/log
        LogHandler.create_app_handler(base),

        # /api/v2/alias-source/xem/operation
        AliasSourceOperationHandler.create_app_handler(base),
        # /api/v2/alias-source
        AliasSourceHandler.create_app_handler(base),

        # /api/v2/alias
        AliasHandler.create_app_handler(base),

        # /api/v2/system
        SystemHandler.create_app_handler(base),

        # /api/v2/authenticate
        AuthHandler.create_app_handler(base),

        # /api/v2/recommeded
        RecommendedHandler.create_app_handler(base),

        # Always keep this last!
        NotFoundHandler.create_app_handler(base)
    ]