/// <summary> /// Get open graph metadata for url Get Open Graph Metadata for a specif URL. Use the Open Graph protocol to get some generic metadata about a URL. Used for creating link previews. __Minimum server version__: 3.10 ##### Permissions No permission required but must be logged in. /// </summary> /// <exception cref="ApiException">Thrown when fails to make API call</exception> /// <param name="body"></param> /// <returns>ApiResponse of OpenGraph</returns> public ApiResponse <OpenGraph> OpengraphPostWithHttpInfo(InlineObject60 body) { // verify the required parameter 'body' is set if (body == null) { throw new ApiException(400, "Missing required parameter 'body' when calling OpenGraphApi->OpengraphPost"); } var requestOptions = new RequestOptions(); string[] @contentTypes = new string[] { "application/json" }; // to determine the Accept header string[] @accepts = new string[] { "application/json" }; var localVarContentType = Sdcb.Mattermost.DotNetSdk.Client.ClientUtils.SelectHeaderContentType(@contentTypes); if (localVarContentType != null) { requestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = Sdcb.Mattermost.DotNetSdk.Client.ClientUtils.SelectHeaderAccept(@accepts); if (localVarAccept != null) { requestOptions.HeaderParameters.Add("Accept", localVarAccept); } requestOptions.Data = body; // make the HTTP request var response = this.Client.Post <OpenGraph>("/opengraph", requestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("OpengraphPost", response); if (exception != null) { throw exception; } } return(response); }
/// <summary> /// Get open graph metadata for url Get Open Graph Metadata for a specif URL. Use the Open Graph protocol to get some generic metadata about a URL. Used for creating link previews. __Minimum server version__: 3.10 ##### Permissions No permission required but must be logged in. /// </summary> /// <exception cref="ApiException">Thrown when fails to make API call</exception> /// <param name="body"></param> /// <returns>Task of ApiResponse (OpenGraph)</returns> public async System.Threading.Tasks.Task <ApiResponse <OpenGraph> > OpengraphPostAsyncWithHttpInfo(InlineObject60 body) { // verify the required parameter 'body' is set if (body == null) { throw new ApiException(400, "Missing required parameter 'body' when calling OpenGraphApi->OpengraphPost"); } var requestOptions = new RequestOptions(); string[] @contentTypes = new string[] { "application/json" }; // to determine the Accept header string[] @accepts = new string[] { "application/json" }; foreach (var contentType in @contentTypes) { requestOptions.HeaderParameters.Add("Content-Type", contentType); } foreach (var accept in @accepts) { requestOptions.HeaderParameters.Add("Accept", accept); } requestOptions.Data = body; // make the HTTP request var response = await this.AsynchronousClient.PostAsync <OpenGraph>("/opengraph", requestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("OpengraphPost", response); if (exception != null) { throw exception; } } return(response); }
/// <summary> /// Get open graph metadata for url Get Open Graph Metadata for a specif URL. Use the Open Graph protocol to get some generic metadata about a URL. Used for creating link previews. __Minimum server version__: 3.10 ##### Permissions No permission required but must be logged in. /// </summary> /// <exception cref="ApiException">Thrown when fails to make API call</exception> /// <param name="body"></param> /// <returns>Task of OpenGraph</returns> public async System.Threading.Tasks.Task <OpenGraph> OpengraphPostAsync(InlineObject60 body) { ApiResponse <OpenGraph> localVarResponse = await OpengraphPostAsyncWithHttpInfo(body); return(localVarResponse.Data); }
/// <summary> /// Get open graph metadata for url Get Open Graph Metadata for a specif URL. Use the Open Graph protocol to get some generic metadata about a URL. Used for creating link previews. __Minimum server version__: 3.10 ##### Permissions No permission required but must be logged in. /// </summary> /// <exception cref="ApiException">Thrown when fails to make API call</exception> /// <param name="body"></param> /// <returns>OpenGraph</returns> public OpenGraph OpengraphPost(InlineObject60 body) { ApiResponse <OpenGraph> localVarResponse = OpengraphPostWithHttpInfo(body); return(localVarResponse.Data); }