code: 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
          )
docs: A convenience method for hooking up the URLs.
  
          This automatically adds a list & a detail endpoint to your routes.
  
          :param app: The ``Flask`` object for your app.
          :type app: ``flask.Flask``
  
          :param rule_prefix: The start of the URL to handle.
          :type rule_prefix: string
  
          :param endpoint_prefix: (Optional) A prefix for the URL's name (for
              endpoints). The default is ``None``, which will autocreate a prefix
              based on the class name. Ex: ``BlogPostResource`` ->
              ``api_blog_post_list``
          :type endpoint_prefix: string
  
          :returns: Nothing