Beispiel #1
0
    def configure(cls):
        api = wing.Api('v1')
        c_res = CategoryResource()
        p_res = PostResource()
        api.register_resource(c_res)
        api.register_resource(p_res)

        api.register_nested_resource('categories', p_res, 'category')

        wing.register_api(cls.app, api)
Beispiel #2
0
 def configure(cls):
     api = wing.Api('v1')
     api.register_resource(UserResource())
     wing.register_api(cls.app, api)