Пример #1
0
        /// <summary>
        /// 拿取(Feature, Content)的api接口。回傳Panel與SubPanel的物件
        /// </summary>
        /// <param name="userId">用戶ID</param>
        /// <returns>FrameResponse物件的JSON: 帶有Panel和SubPanel的字串</returns>
        public IHttpActionResult PostIntegrate(int userId)
        {
            //拿body中的Feature與Content。並存為Instruct物件
            Instruct instruct = Request.Content.ReadAsAsync <Instruct>().Result;

            //向Feature類別索取FrameObject
            FrameObject frameObject = FeatureReactor.GetFrameObject(userId, instruct);

            //將response包成Json格式
            JObject json = frameObject.ToJson <FrameObject>();

            return(Ok(json));
        }
Пример #2
0
 protected void Application_Start()
 {
     OrderingRule.LoadOrdering();
     FeatureReactor.LoadIFeature();
     GlobalConfiguration.Configure(WebApiConfig.Register);
 }