public ModifyFeedWhiteListResponse ModifyFeedWhiteList(string feedId, ModifyFeedWhiteListRequest request) { AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); ModifyFeedWhiteListHeaders headers = new ModifyFeedWhiteListHeaders(); return(ModifyFeedWhiteListWithOptions(feedId, request, headers, runtime)); }
public async Task <ModifyFeedWhiteListResponse> ModifyFeedWhiteListWithOptionsAsync(string feedId, ModifyFeedWhiteListRequest tmpReq, ModifyFeedWhiteListHeaders headers, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) { AlibabaCloud.TeaUtil.Common.ValidateModel(tmpReq); feedId = AlibabaCloud.OpenApiUtil.Client.GetEncodeParam(feedId); ModifyFeedWhiteListShrinkRequest request = new ModifyFeedWhiteListShrinkRequest(); AlibabaCloud.OpenApiUtil.Client.Convert(tmpReq, request); if (!AlibabaCloud.TeaUtil.Common.IsUnset(tmpReq.ModifyUserList)) { request.ModifyUserListShrink = AlibabaCloud.OpenApiUtil.Client.ArrayToStringWithSpecifiedStyle(tmpReq.ModifyUserList, "modifyUserList", "json"); } Dictionary <string, object> query = new Dictionary <string, object>() { }; if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Action)) { query["action"] = request.Action; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ModifyUserListShrink)) { query["modifyUserList"] = request.ModifyUserListShrink; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.UserId)) { query["userId"] = request.UserId; } Dictionary <string, string> realHeaders = new Dictionary <string, string>() { }; if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.CommonHeaders)) { realHeaders = headers.CommonHeaders; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.XAcsDingtalkAccessToken)) { realHeaders["x-acs-dingtalk-access-token"] = AlibabaCloud.TeaUtil.Common.ToJSONString(headers.XAcsDingtalkAccessToken); } AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest { Headers = realHeaders, Query = AlibabaCloud.OpenApiUtil.Client.Query(query), }; return(TeaModel.ToObject <ModifyFeedWhiteListResponse>(await DoROARequestAsync("ModifyFeedWhiteList", "live_1.0", "HTTP", "POST", "AK", "/v1.0/live/openFeeds/" + feedId + "/whiteList", "json", req, runtime))); }
public async Task <ModifyFeedWhiteListResponse> ModifyFeedWhiteListAsync(string feedId, ModifyFeedWhiteListRequest request) { AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); ModifyFeedWhiteListHeaders headers = new ModifyFeedWhiteListHeaders(); return(await ModifyFeedWhiteListWithOptionsAsync(feedId, request, headers, runtime)); }