code: def register_resource(self, resource, defer=False):
          
          if defer:
              self.deferred.append(resource)
          else:
              resource.init_api(self)
              self.app.register_blueprint(resource, url_prefix=self.url_prefix)
docs: Register a :class:`.Resource` blueprint object against the Flask app object.
  
          :param resource: :class:`.Resource` or :class:`flask.Blueprint`
              object.
          :param defer: Optionally specify that registering this resource should be
              deferred.  This option is useful when users are creating their
              Flask app instance via a factory.
  
          **Deferred resource registration**
  
          Resources can optionally be registered in a deferred manner.  Simply pass
          `defer=True` to :meth:`.ArrestedAPI.register_resource` to attach the resource to
          the API without calling register_blueprint.
  
          This is useful when you're using the factory pattern for creating your Flask app
          object as demonstrated below. Deferred resource will not be registered until the
          ArrestedAPI instance is initialised with the Flask app object.
  
          Usage::
  
              api_v1 = ArrestedAPI(prefix='/v1')
              characters_resource = Resource(
                  'characters', __name__, url_prefix='/characters'
              )
              ap1_v1.register_resource(characters_resource, defer=True)
  
              def create_app():
  
                  app = Flask(__name__)
                  api_v1.init_app(app) # deferred resources are now registered.