Skip to content

Conversation

@tarrball
Copy link
Owner

@tarrball tarrball commented Aug 12, 2025

Pull Request Overview

This PR cleans up and expands the data contracts for the Guardian API client to better match the full API specification. The changes significantly enhance the library's capabilities by providing comprehensive, strongly-typed options and complete API feature support.

Key Changes:

  • Replaces basic string arrays with strongly-typed enum options for fields, tags, elements, and references
  • Introduces comprehensive search option classes to support all Guardian API parameters (filtering, pagination, ordering, dates)
  • Reorganizes the API to use interface-based design with IGuardianApiClient for better testability

Reviewed Changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
guardian-api-spec.yaml Complete removal of API specification file
README.md Comprehensive update with advanced usage examples and full feature documentation
GuardianApiContentSearchOptions.cs New comprehensive search options container class
GuardianApiContentShowTagsOption.cs New enum for strongly-typed tag options
GuardianApiContentShowRightsOption.cs New enum for rights options
GuardianApiContentShowReferencesOption.cs New enum for reference types
GuardianApiContentShowFieldsOption.cs New enum for content field options
GuardianApiContentShowElementsOption.cs New enum for media element options
GuardianApiContentPageOptions.cs New class for pagination options
GuardianApiContentOrderOptions.cs New class for result ordering options
GuardianApiContentOrderDate.cs New enum for order date types
GuardianApiContentOrderBy.cs New enum for sort order options
GuardianApiContentFilterOptions.cs New comprehensive filtering options class
GuardianApiContentDateOptions.cs New date range filtering options class
GuardianApiContentAdditionalInformationOptions.cs New class for additional content enhancement options
ContentSearchResponse.cs Enhanced with documentation and changed Results to ICollection
ContentItem.cs Added comprehensive documentation
BaseResponse.cs Added field documentation
UrlParameterBuilder.cs New internal utility for building URL parameters
AssemblyInfo.cs New internal utility for package version retrieval
AdditionalInformationExtensions.cs New extension methods for enum-to-API string conversion
IGuardianApiClient.cs New interface for client abstraction
GuardianClient.csproj Version bump and repository URL fix
GuardianApiOptions.cs Removed old simplistic options class
GuardianApiClient.cs Complete refactor to use new option classes and interface
Multiple test files Updated tests for new API structure and comprehensive coverage

@tarrball tarrball requested a review from Copilot August 12, 2025 02:03

This comment was marked as resolved.

@tarrball tarrball merged commit f2ed551 into main Aug 12, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants