Esempio n. 1
0
        public HttpResponseMessage BiDuiCar(string imgpath)
        {
            string tupath   = HelpTool.GetFilePath(imgpath);
            var    tokenobj = JsonConvert.DeserializeObject <CarModel>(BaiDuAITool.GetCarResult(tupath));
            List <CarResultContent> result = tokenobj.result;

            return(ReturnHttpResponse(JsonConvert.SerializeObject(result)));
        }
Esempio n. 2
0
        public HttpResponseMessage GetCarInfo(string name)
        {
            var chebody = BaiDuAITool.GetCarBodyResult(name);

            var carobj = JsonConvert.DeserializeObject <CarBiaoModel>(chebody);

            var result = carobj.result.list;

            return(ReturnHttpResponse(JsonConvert.SerializeObject(result)));
        }
Esempio n. 3
0
        public HttpResponseMessage GetCaipu(string name)
        {
            var Zuocai = BaiDuAITool.CaiPu(name);

            var caipuobj = JsonConvert.DeserializeObject <CaipuModel>(Zuocai);

            var result = caipuobj.result.list[0];

            return(ReturnHttpResponse(JsonConvert.SerializeObject(result)));
        }
Esempio n. 4
0
        public HttpResponseMessage BiDuiImg(string imgpath)
        {
            #region 根据百度API得到菜名
            string tupath   = HelpTool.GetFilePath(imgpath);
            var    tokenobj = JsonConvert.DeserializeObject <CaiModel>(BaiDuAITool.GetCaiResult(tupath));
            List <CaiResultContent> result = tokenobj.result;
            return(ReturnHttpResponse(JsonConvert.SerializeObject(result)));

            #endregion
        }