/// <summary>Constructs a new service.</summary> /// <param name="initializer">The service initializer.</param> public FactCheckToolsService(Google.Apis.Services.BaseClientService.Initializer initializer) : base(initializer) { Claims = new ClaimsResource(this); Pages = new PagesResource(this); }
private PageList ListPages(string blogId, int? maxPages, PagesResource.ListRequest.StatusEnum status, PageList previousPage) { if (previousPage != null && string.IsNullOrWhiteSpace(previousPage.NextPageToken)) { // The previous page was also the last page, so do nothing and return an empty list. return new PageList(); } var getPagesRequest = GetService().Pages.List(blogId); if (maxPages.HasValue) { // Google has a per-request results limit on their API. getPagesRequest.MaxResults = Math.Min(maxPages.Value, MaxResultsPerRequest); } getPagesRequest.Status = status; return getPagesRequest.Execute(); }