Esempio n. 1
0
        public void AddRoutes(APIRouter router)
        {
            APIRoute[] inventoryRoutes =
            {
                new APIRoute("ALL", "/category/{category}",            HandleCategory),
                new APIRoute("ALL", "/category/{category}/children",   HandleCategoryChildren),
                new APIRoute("ALL", "/category/{category}/links",      HandleCategoryLinks),
                new APIRoute("ALL", "/category/{category}/items",      HandleCategoryItems),
                new APIRoute("ALL", "/category/{category}/categories", HandleCategoryCategories),
                new APIRoute("ALL", "/item/{item}",                    HandleItem),
            };

            router.AddRoutes(inventoryRoutes);
        }