예제 #1
0
        /// <summary>
        /// Read slide shapes or shape info.
        /// </summary>
        /// <param name="request">Request. <see cref="GetNotesSlideShapesRequest" /></param>
        /// <returns><see cref="ShapeListResponse"/></returns>
        public ShapeListResponse GetNotesSlideShapes(GetNotesSlideShapesRequest request)
        {
            // verify the required parameter 'name' is set
            if (request.Name == null)
            {
                throw new ApiException(400, "Missing required parameter 'name' when calling GetNotesSlideShapes");
            }

            // verify the required parameter 'path' is set
            if (request.Path == null)
            {
                throw new ApiException(400, "Missing required parameter 'path' when calling GetNotesSlideShapes");
            }

            // create path and map variables
            string resourcePath = GetResourceUrl("/slides/{name}/slides/{slideIndex}/notesSlide/shapes/{path}");

            resourcePath = UrlHelper.AddPathParameter(resourcePath, "name", request.Name);
            resourcePath = UrlHelper.AddPathParameter(resourcePath, "slideIndex", request.SlideIndex);
            resourcePath = UrlHelper.AddPathParameter(resourcePath, "path", request.Path);
            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(InvokeApi <ShapeListResponse>(resourcePath, "GET", null, null, files, contentType));
        }
        private GetNotesSlideShapesRequest createGetNotesSlideShapesRequest()
        {
            GetNotesSlideShapesRequest request = new GetNotesSlideShapesRequest();

            request.Name       = "test.pptx";
            request.SlideIndex = 1;

            return(request);
        }
        public void getNotesSlideShapesTest()
        {
            ShapeListResponse response = null;

            try
            {
                GetNotesSlideShapesRequest request = createGetNotesSlideShapesRequest();
                response = api.GetNotesSlideShapes(request);
                Console.WriteLine(response.Code);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }