/// <summary> /// /// </summary> /// <returns></returns> public HttpResponseMessage GetRanking() { DataSet Ranking_info = SQL_oparations.SELECT_Ranking(); string json = Newtonsoft.Json.JsonConvert.SerializeObject(Ranking_info); HttpResponseMessage res = Request.CreateResponse(HttpStatusCode.OK); res.Content = new StringContent(json, Encoding.UTF8, "application/json"); return(res); }
/// <summary> /// パラメータのない GET メソッドに対応するメソッド /// 更新がかかったときなどに適当なuserを取得 /// 例:GET /api/default/GetUser /// </summary> /// <returns></returns> public HttpResponseMessage GetUser() { SQL_oparations.SELECT_user(SQL_oparations.SELECT_RND()); Person Selection_id = SQL_oparations.SELECT_user(SQL_oparations.SELECT_RND()); string json = Newtonsoft.Json.JsonConvert.SerializeObject(Selection_id); HttpResponseMessage res = Request.CreateResponse(HttpStatusCode.OK); res.Content = new StringContent(json, Encoding.UTF8, "application/json"); return(res); }
// POST: api/Default /// <summary> /// 例:/api/default/Post /// </summary> /// <param name="singup_user"></param> /// <returns></returns> public void Post([FromBody] Person singup_user) { SQL_oparations.INSERT_DATA(singup_user); }