예제 #1
0
 /// <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>());
 }
예제 #2
0
 /// <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());
 }
예제 #3
0
 /// <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>());
 }
예제 #4
0
 /// <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>());
 }
예제 #5
0
 /// <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>());
 }
예제 #6
0
 /// <summary>
 /// 开始/停止录像
 /// </summary>
 /// <returns></returns>
 public HttpResponse <RecordResult> ProcessRecord(ProcessRecordParam param, long timeout = 30)
 {
     return(Rtc.Post("/records", timeout)
            .AddRangeField(param.ToParameter())
            .asJson <RecordResult>());
 }
예제 #7
0
 /// <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>());
 }
예제 #8
0
 /// <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>());
 }
예제 #9
0
 /// <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());
 }
예제 #10
0
 /// <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>());
 }
예제 #11
0
 /// <summary>
 /// 删除此项目信息
 /// </summary>
 /// <param name="timeout"></param>
 /// <returns></returns>
 public HttpResponse <string> DeleteProject(long timeout = 30)
 {
     return(Rtc.Delete("/project/delete", timeout)
            .asString());
 }
예제 #12
0
 /// <summary>
 /// 获取此项目信息
 /// </summary>
 /// <param name="timeout"></param>
 /// <returns></returns>
 public HttpResponse <ProjectItem> GetProjectDetail(long timeout = 30)
 {
     return(Rtc.Get("/project/detail", timeout).asJson <ProjectItem>());
 }
예제 #13
0
 /// <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>());
 }
예제 #14
0
 /// <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>());
 }
예제 #15
0
 /// <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>());
 }
예제 #16
0
 /// <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>());
 }
예제 #17
0
 /// <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>());
 }
예제 #18
0
 /// <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>());
 }