private GetNotesSlideWithFormatRequest createGetNotesSlideWithFormatRequest() { GetNotesSlideWithFormatRequest request = new GetNotesSlideWithFormatRequest(); request.Name = "test.pptx"; request.SlideIndex = 1; request.Format = NotesSlideExportFormat.Jpeg; return(request); }
public void getNotesSlideWithFormatExample() { Stream response = null; try { GetNotesSlideWithFormatRequest request = createGetNotesSlideWithFormatRequest(); response = api.GetNotesSlideWithFormat(request); Console.WriteLine(response); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
public void GetNotesSlideWithFormatInvalidStorage() { InvalidPropertyTestExecutor <GetNotesSlideWithFormatRequest, System.IO.Stream> testExecutor = new InvalidPropertyTestExecutor <GetNotesSlideWithFormatRequest, System.IO.Stream>("GetNotesSlideWithFormat", "Storage"); GetNotesSlideWithFormatRequest request = testExecutor.PrepareRequest(); System.IO.Stream response = null; bool needAssertResponse = false; try { response = m_instance.GetNotesSlideWithFormat(request); needAssertResponse = true; } catch (Exception ex) { testExecutor.AssertException(ex); } if (needAssertResponse) { testExecutor.AssertResult(response); } }
/// <summary> /// Convert Notes Slide to the specified picture format. /// </summary> /// <param name="request">Request. <see cref="GetNotesSlideWithFormatRequest" /></param> /// <returns><see cref="System.IO.Stream"/></returns> public System.IO.Stream GetNotesSlideWithFormat(GetNotesSlideWithFormatRequest request) { // verify the required parameter 'name' is set if (request.Name == null) { throw new ApiException(400, "Missing required parameter 'name' when calling GetNotesSlideWithFormat"); } // create path and map variables string resourcePath = GetResourceUrl("/slides/{name}/slides/{slideIndex}/notesSlide/saveAs/{format}"); resourcePath = UrlHelper.AddPathParameter(resourcePath, "name", request.Name); resourcePath = UrlHelper.AddPathParameter(resourcePath, "slideIndex", request.SlideIndex); resourcePath = UrlHelper.AddPathParameter(resourcePath, "format", request.Format); resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "width", request.Width); resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "height", request.Height); resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "folder", request.Folder); resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storage", request.Storage); string contentType = "application/json"; var files = new List <FileInfo>(); PickFiles(files, request); return(InvokeBinaryApi(resourcePath, "GET", null, null, files, contentType)); }