/// <summary> /// Render shape to specified picture format. /// </summary> /// <param name="request">Request. <see cref="GetNotesSlideShapeWithFormatRequest" /></param> /// <returns><see cref="System.IO.Stream"/></returns> public System.IO.Stream GetNotesSlideShapeWithFormat(GetNotesSlideShapeWithFormatRequest request) { // verify the required parameter 'name' is set if (request.Name == null) { throw new ApiException(400, "Missing required parameter 'name' when calling GetNotesSlideShapeWithFormat"); } // create path and map variables string resourcePath = GetResourceUrl("/slides/{name}/slides/{slideIndex}/notesSlide/shapes/{shapeIndex}/saveAs/{format}"); resourcePath = UrlHelper.AddPathParameter(resourcePath, "name", request.Name); resourcePath = UrlHelper.AddPathParameter(resourcePath, "slideIndex", request.SlideIndex); resourcePath = UrlHelper.AddPathParameter(resourcePath, "shapeIndex", request.ShapeIndex); resourcePath = UrlHelper.AddPathParameter(resourcePath, "format", request.Format); resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "folder", request.Folder); resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storage", request.Storage); resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "scaleX", request.ScaleX); resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "scaleY", request.ScaleY); resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "bounds", request.Bounds); resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "outPath", request.OutPath); resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "fontsFolder", request.FontsFolder); string contentType = "application/json"; var files = new List <FileInfo>(); PickFiles(files, request); return(InvokeBinaryApi(resourcePath, "GET", null, null, files, contentType)); }
private GetNotesSlideShapeWithFormatRequest createGetNotesSlideShapeWithFormatRequest() { GetNotesSlideShapeWithFormatRequest request = new GetNotesSlideShapeWithFormatRequest(); request.Name = "test.pptx"; request.SlideIndex = 1; request.ShapeIndex = 0; request.Format = ShapeExportFormat.Jpeg; return(request); }
public void getNotesSlideShapeWithFormatTest() { Stream response = null; try { GetNotesSlideShapeWithFormatRequest request = createGetNotesSlideShapeWithFormatRequest(); response = api.GetNotesSlideShapeWithFormat(request); Console.WriteLine(response); } catch (Exception ex) { Console.WriteLine(ex.Message); } }