using Assets.Scripts.Apis.Models; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Assets.Scripts.Apis { public class GameRoomApi : ApiBase { public async Task> Add(string name,int routeId,string pwd,DateTime startTime,int closeTime,int maxMembers) { return await PostAsync>($"GameRoom/Add", new { name, routeId, pwd, startTime, closeTime, maxMembers }); } public async Task> GetList(int pageIndex, int pageSize,string name = "") { return await GetAsync>($"GameRoom/GetList?pageIndex={pageIndex}&pageSize={pageSize}&name={name}"); } public JsonResult GetDetail(int id) { return Get>($"GameRoom/GetDetail?Id={id}"); } public async Task> ConfirmRoomPwd(int id,string pwd) { return await GetAsync>($"GameRoom/ConfirmRoomPwd?id={id}&pwd={pwd}"); } public JsonResult GetMapVideoURL(int routeId) { return Get>($"Map/GetMapVideoURL?id={routeId}"); } } }