@classmethod
    def add_url_rules(cls, app, rule_prefix, endpoint_prefix=None):
        methods = ['GET', 'POST', 'PUT', 'DELETE']

        app.add_url_rule(
            rule_prefix,
            endpoint=cls.build_endpoint_name('list', endpoint_prefix),
            view_func=cls.as_list(),
            methods=methods
        )
        app.add_url_rule(
            rule_prefix + '<pk>/',
            endpoint=cls.build_endpoint_name('detail', endpoint_prefix),
            view_func=cls.as_detail(),
            methods=methods
        )
A convenience method for hooking up the URLs.
dataset/ETHPy150Open toastdriven/restless/restless/fl.py/FlaskResource.add_url_rules