/// <summary> /// 获取session_id下临时令牌列表 /// </summary> /// <param name="timeout">请求超时时间,单位秒</param> /// <returns></returns> public static HttpResponse <GetTokenResult> GetTokensNoPermanent(string session_id, int page = 1, int page_size = 25, long timeout = 30) { return(Rtc.Get("/sessions/" + session_id + "/tokens/nonpermanent?page=" + page + "&page_size=" + page_size, timeout).asJson <GetTokenResult>()); }
/// <summary> /// 删除一个令牌 /// </summary> /// <param name="token_id"></param> /// <param name="timeout">请求超时时间,单位秒</param> /// <returns></returns> public static HttpResponse <string> DeleteToken(string token_id, long timeout = 30) { return(Rtc.Delete("/tokens/" + token_id, timeout).asString()); }
/// <summary> /// 创建一个令牌 /// </summary> /// <param name="param"></param> /// <param name="timeout">请求超时时间,单位秒</param> /// <returns></returns> public static HttpResponse <TokenResult> CreateToken(CreateTokenParameter param, long timeout = 30) { return(Rtc.Post("/sessions/" + param.session_id + "/tokens", timeout) .AddRangeField(param.ToParameter()) .asJson <TokenResult>()); }
/// <summary> /// 获取一个会话 /// </summary> /// <param name="session_id">会话Id</param> /// <param name="timeout">请求超时时间,单位秒</param> /// <returns></returns> public static HttpResponse <SessionResult> GetSession(string session_id, long timeout = 30) { return(Rtc.Get("/sessions/" + session_id, timeout).asJson <SessionResult>()); }
/// <summary> /// 修改一个会话 /// </summary> /// <param name="param"></param> /// <param name="timeout">请求超时时间,单位秒</param> /// <returns></returns> public static HttpResponse <SessionResult> UpdateSession(UpdateSessionParameter param, long timeout = 30) { return(Rtc.Patch("/sessions/" + param.session_id, timeout) .AddRangeField(param.ToParameter()) .asJson <SessionResult>()); }
/// <summary> /// 开始/停止录像 /// </summary> /// <returns></returns> public HttpResponse <RecordResult> ProcessRecord(ProcessRecordParam param, long timeout = 30) { return(Rtc.Post("/records", timeout) .AddRangeField(param.ToParameter()) .asJson <RecordResult>()); }
/// <summary> /// 获取临时会话列表 /// </summary> /// <param name="timeout">请求超时时间,单位秒</param> /// <returns></returns> public static HttpResponse <GetSessionsResult> GetSessionsNoPermanent(int page = 1, int page_size = 25, long timeout = 30) { return(Rtc.Get("/sessions/nonpermanent?page=" + page + "&page_size=" + page_size, timeout).asJson <GetSessionsResult>()); }
/// <summary> /// 重置此项目API Secret /// </summary> /// <param name="timeout"></param> /// <returns></returns> public HttpResponse <ProjectItem> ResetProject(long timeout = 30) { return(Rtc.Delete("/project/reset", timeout) .asJson <ProjectItem>()); }
/// <summary> /// 删除一个会话 /// </summary> /// <param name="param"></param> /// <param name="timeout">请求超时时间,单位秒</param> /// <returns></returns> public static HttpResponse <string> DeleteSession(string session_id, long timeout = 30) { return(Rtc.Delete("/sessions/" + session_id, timeout).asString()); }
/// <summary> /// 更新此项目 /// </summary> /// <param name="para"></param> /// <param name="timeout"></param> /// <returns></returns> public HttpResponse <ProjectItem> UpdateProject(ProjectParameter para, long timeout = 30) { return(Rtc.Patch("/project/update", timeout) .AddRangeField(para.ToParameter()) .asJson <ProjectItem>()); }
/// <summary> /// 删除此项目信息 /// </summary> /// <param name="timeout"></param> /// <returns></returns> public HttpResponse <string> DeleteProject(long timeout = 30) { return(Rtc.Delete("/project/delete", timeout) .asString()); }
/// <summary> /// 获取此项目信息 /// </summary> /// <param name="timeout"></param> /// <returns></returns> public HttpResponse <ProjectItem> GetProjectDetail(long timeout = 30) { return(Rtc.Get("/project/detail", timeout).asJson <ProjectItem>()); }
/// <summary> /// 更新一个录像记录 /// </summary> /// <param name="record_id"></param> /// <param name="label"></param> /// <param name="timeout"></param> /// <returns></returns> public HttpResponse <RecordResult> UpdateRecord(string record_id, string label, long timeout = 30) { return(Rtc.Patch("/records/" + record_id, timeout).field("label", label).asJson <RecordResult>()); }
/// <summary> /// 获取一个录像记录 /// </summary> /// <param name="record_id"></param> /// <param name="timeout"></param> /// <returns></returns> public HttpResponse <RecordResult> GerRecord(string record_id, long timeout = 30) { return(Rtc.Get("/records/" + record_id, timeout).asJson <RecordResult>()); }
/// <summary> /// 获取一个令牌 /// </summary> /// <param name="token_id"></param> /// <param name="timeout">请求超时时间,单位秒</param> /// <returns></returns> public static HttpResponse <TokenResult> GetToken(string token_id, long timeout = 30) { return(Rtc.Get("/tokens/" + token_id, timeout).asJson <TokenResult>()); }
/// <summary> /// 创建一个会话 /// </summary> /// <param name="param">CreateSessionParameter对象</param> /// <param name="timeout">请求超时时间,单位秒</param> /// <returns></returns> public static HttpResponse <SessionResult> CreateSession(CreateSessionParameter param, long timeout = 30) { return(Rtc.Post("/sessions", timeout) .AddRangeField(param.ToParameter()) .asJson <SessionResult>()); }
/// <summary> /// 修改一个令牌 /// </summary> /// <param name="param"></param> /// <param name="timeout">请求超时时间,单位秒</param> /// <returns></returns> public static HttpResponse <TokenResult> UpdateToken(UpdateTokenParameter param, long timeout = 30) { return(Rtc.Patch("/tokens/" + param.token_id, timeout) .AddRangeField(param.ToParameter()) .asJson <TokenResult>()); }
/// <summary> /// 获取录制记录列表 /// </summary> /// <param name="timeout"></param> /// <returns></returns> public HttpResponse <GetRecordsResult> GetRecords(int page = 1, int page_size = 25, long timeout = 30) { return(Rtc.Get("/records?page=" + page + "&page_size=" + page_size, timeout).asJson <GetRecordsResult>()); }