def resource(self, *urls, **kwargs):
def decorator(cls):<EOL><INDENT>self.add_resource(cls, *urls, **kwargs)<EOL>return cls<EOL><DEDENT>return decorator<EOL>
Wraps a :class:`~flask_restful.Resource` class, adding it to the
        api. Parameters are the same as :meth:`~flask_restful.Api.add_resource`.

        Example::

            app = Flask(__name__)
            api = restful.Api(app)

            @api.resource('/foo')
            class Foo(Resource):
                def get(self):
                    return 'Hello, World!'