private GetLayoutSlidesListRequest createGetLayoutSlidesListRequest()
        {
            GetLayoutSlidesListRequest request = new GetLayoutSlidesListRequest();

            request.Name = "test.pptx";

            return(request);
        }
        public void GetLayoutSlidesListExample()
        {
            LayoutSlideListResponse response = null;

            try
            {
                GetLayoutSlidesListRequest request = createGetLayoutSlidesListRequest();
                response = api.GetLayoutSlidesList(request);
                Console.WriteLine(response);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
コード例 #3
0
        /// <summary>
        /// Read presentation layoutSlides info.
        /// </summary>
        /// <param name="request">Request. <see cref="GetLayoutSlidesListRequest" /></param>
        /// <returns><see cref="LayoutSlideListResponse"/></returns>
        public LayoutSlideListResponse GetLayoutSlidesList(GetLayoutSlidesListRequest request)
        {
            // verify the required parameter 'name' is set
            if (request.Name == null)
            {
                throw new ApiException(400, "Missing required parameter 'name' when calling GetLayoutSlidesList");
            }

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

            resourcePath = UrlHelper.AddPathParameter(resourcePath, "name", request.Name);
            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 <LayoutSlideListResponse>(resourcePath, "GET", null, null, files, contentType));
        }
        public void GetLayoutSlidesListInvalidStorage()
        {
            InvalidPropertyTestExecutor <GetLayoutSlidesListRequest, LayoutSlideListResponse> testExecutor =
                new InvalidPropertyTestExecutor <GetLayoutSlidesListRequest, LayoutSlideListResponse>("GetLayoutSlidesList", "Storage");
            GetLayoutSlidesListRequest request  = testExecutor.PrepareRequest();
            LayoutSlideListResponse    response = null;
            bool needAssertResponse             = false;

            try
            {
                response           = m_instance.GetLayoutSlidesList(request);
                needAssertResponse = true;
            }
            catch (Exception ex)
            {
                testExecutor.AssertException(ex);
            }
            if (needAssertResponse)
            {
                testExecutor.AssertResult(response);
            }
        }