示例#1
0
        public static async Task <ObservableCollection <RecipeDetailModel> > GetRecipeDetail(string registeredNo)
        {
            string url = RestClientUtil.GetSpliceUrl("/api/UserRecipeDetail/GetsByRegisteredNo", new Dictionary <string, string>
            {
                { "registeredNo", registeredNo }
            });
            string content = await RestClientUtil.GetTokenAsync(url);

            return(await Task.Run(() => ParseResponseJsonContent.ParseObCollection <RecipeDetailModel>(content, out string msg)));
        }
示例#2
0
        public static async Task <ObservableCollection <NewsModel> > GetCollectNewsDetails(Guid userId)
        {
            string url = RestClientUtil.GetSpliceUrl("/api/UserCollectNews/GetsNewsDetail", new Dictionary <string, string>
            {
                { "uid", userId.ToString() }
            });
            string content = await RestClientUtil.GetTokenAsync(url);

            return(await Task.Run(() => ParseResponseJsonContent.ParseObCollection <NewsModel>(content, out string msg)));
        }
示例#3
0
        public static async Task <ObservableCollection <NewsCommentModel> > GetNewsComments(int id)
        {
            string url = RestClientUtil.GetSpliceUrl("/api/NewsComment/Gets", new Dictionary <string, string>
            {
                { "Id", id.ToString() }
            });
            string content = await RestClientUtil.GetUnTokenAsync(url);

            return(await Task.Run(() => ParseResponseJsonContent.ParseObCollection <NewsCommentModel>(content, out string msg)));
        }
示例#4
0
        public static async Task <ObservableCollection <ChatContentViewModel> > GetChatContent(int chatId)
        {
            string url = RestClientUtil.GetSpliceUrl("/api/ChatContent/Gets", new Dictionary <string, string>
            {
                { "chatId", chatId.ToString() }
            });
            string content = await RestClientUtil.GetTokenAsync(url);

            return(await Task.Run(() => ParseResponseJsonContent.ParseObCollection <ChatContentViewModel>(content, out string msg)));
        }
示例#5
0
        public static async Task <ObservableCollection <ReserveDoctorViewModel> > GetReserveDoctors(Guid uid)
        {
            string url = RestClientUtil.GetSpliceUrl("/api/UserReserveRecord/Gets", new Dictionary <string, string>
            {
                { "uid", uid.ToString() }
            });
            string content = await RestClientUtil.GetTokenAsync(url);

            return(await Task.Run(() => ParseResponseJsonContent.ParseObCollection <ReserveDoctorViewModel>(content, out string msg)));
        }
示例#6
0
        public static async Task <ObservableCollection <DoctorViewModel> > GetDoctorsByName(string hosCode, string name)
        {
            string url = RestClientUtil.GetSpliceUrl("/api/DoctorInfo/GetsByName", new Dictionary <string, string>
            {
                { "hosCode", hosCode }, { "name", name }
            });
            string content = await RestClientUtil.GetUnTokenAsync(url);

            return(await Task.Run(() => ParseResponseJsonContent.ParseObCollection <DoctorViewModel>(content, out string msg)));
        }