public async Task <CreateFeedResponse> CreateFeedAsync(CreateFeedRequest request) { AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); CreateFeedHeaders headers = new CreateFeedHeaders(); return(await CreateFeedWithOptionsAsync(request, headers, runtime)); }
public CreateFeedResponse CreateFeed(CreateFeedRequest request) { AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); CreateFeedHeaders headers = new CreateFeedHeaders(); return(CreateFeedWithOptions(request, headers, runtime)); }
public CreateFeedResponse CreateFeedWithOptions(CreateFeedRequest request, CreateFeedHeaders headers, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) { AlibabaCloud.TeaUtil.Common.ValidateModel(request); Dictionary <string, object> body = new Dictionary <string, object>() { }; if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.CourseInfo.ToMap())) { body["courseInfo"] = request.CourseInfo; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.CreateUserId)) { body["createUserId"] = request.CreateUserId; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.FeedInfo.ToMap())) { body["feedInfo"] = request.FeedInfo; } 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, Body = AlibabaCloud.OpenApiUtil.Client.ParseToMap(body), }; return(TeaModel.ToObject <CreateFeedResponse>(DoROARequest("CreateFeed", "content_1.0", "HTTP", "POST", "AK", "/v1.0/content/feeds", "json", req, runtime))); }