Skip to content

Conversation

@qodana-cloud
Copy link
Contributor

@qodana-cloud qodana-cloud bot commented Nov 24, 2025

Adds qodana.yaml and GitHub workflow file that runs Qodana static analysis on each pull request.

@ChaseDRedmon ChaseDRedmon merged commit eb29d2e into main Nov 24, 2025
1 check failed
@ChaseDRedmon ChaseDRedmon deleted the qodana-automation-1772283306 branch November 24, 2025 19:43
ChaseDRedmon pushed a commit that referenced this pull request Nov 24, 2025
* Add qodana.yaml file

* Add github workflow file

---------

Co-authored-by: Qodana Application <qodana-support@jetbrains.com>
ChaseDRedmon added a commit that referenced this pull request Nov 24, 2025
* Organize Requests and Clients into subfolders; Rename CreateAlbumRequest.cs to RemoteCreateAlbumRequest.cs. Add LocalCreateAlbumRequest.cs to create albums on catbox while uploading local files. Create abstraction for Local and Remote Requests: AlbumCreationRequest.cs. Begin work on CatBox client abstraction layer and created a method to upload files and create an album in one step. Working on better error handling from the API side of things.

* Condense error handling error by creating a Throw helper class for exceptions

* Organized request types by File, Url, or Album. Wrote some wrapper methods for uploading files and creating albums.

* A little bit of work on the error handling using a HttpClient Delegating Handler

* Sealed record requests

* Implementation for uploading multiple files and creating an album that doesn't already exist

* Added upload images to album method. Bump PolySharp version. Code formatting, variable renaming, etc. Add upload to album request type. Renamed some request types. Trying out AnyOf request type to simplify API usage

* Code organization, renaming classes for readability improvements. Tweaks to Delegating Handler for exception throwing

* Const string

* Add BetterEnum source generator to remove duplicated API String Parameter code. Remove ToRequest methods that converted Enums to API equivalent request values. Add AddHttpClientWithMessageHandler extension method to clean up service registration. Code comments. Code organization.

* Moved files

* Code organization, remove throw new and replace with Throw helper

* Remove CreateAlbum methods and consolidate request methods using AnyOf union type. Add AnyOf dependency. Add IAlbumUploadRequest.cs to abstract CreateAlbumRequest.cs and UploadToAlbumRequest.cs. Remove redundant upload methods in CatBox.cs. Rename Upload methods in CatBoxClient.cs. Change return type CatBoxClient.UplaodImage to IAsyncEnumerable<string?> instead of Task<string?>.

* Remove UploadHost because I don't think I'll ever actually use this

* Documentation and exception messaging improvements

* Consolidate null checks

* refactor: consolidate base class naming conventions

Standardizes base class naming by adding "Base" suffix to abstract request classes. This improves code clarity by making inheritance hierarchies more explicit.

Changes:
- Rename AlbumCreationRequest → AlbumCreationRequestBase
- Rename Album → AlbumBase
- Rename UploadRequest → UploadRequestBase
- Rename TemporaryRequest → TemporaryRequestBase
- Update all derived classes to reference new base class names

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: remove client interfaces and adopt concrete implementations

Removes interface abstractions for client classes, transitioning to direct concrete type registration. This simplifies the architecture by eliminating unnecessary abstraction layers.

Changes:
- Remove ICatBox, ICatBoxClient, and ILitterboxClient interfaces
- Update DI registration to use concrete types directly
- Aligns with modern DI practices where interfaces are only needed for multiple implementations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: reorganize Throw helper to Client namespace

Moves Throw helper class from root namespace to CatBox.NET.Client namespace for better logical organization. The class contains HTTP client-specific validation helpers for file size limits and album operations.

Changes:
- Move src/CatBox.NET/Throw.cs → src/CatBox.NET/Client/Throw.cs
- Add AssemblyInfo.cs with InternalsVisibleTo attribute for test projects
- Improves code organization by placing validation helpers near their usage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: update client implementations and request handling

Refactors client implementation code to utilize the new Throw helper methods, improving error handling consistency. Updates method signatures to work with renamed base classes and enhances validation logic throughout upload and album management operations.

Changes:
- Update CatBox.cs, CatBoxClient.cs, and LitterboxClient.cs with improved validation
- Streamline file processing in both CatBox and Litterbox clients
- Enhance error handling consistency using centralized Throw helpers
- Update method signatures for renamed base classes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: modernize enum implementations with Intellenum

Removes custom ApiValueAttribute in favor of Intellenum source generator pattern. Refactors RequestType and ExpireAfter enums to use Intellenum's built-in value mapping, eliminating the need for custom attribute reflection.

Changes:
- Delete src/CatBox.NET/Attributes/ApiValueAttribute.cs
- Refactor RequestType and ExpireAfter to use Intellenum
- Update RequestParameters enum implementation
- Improves performance by leveraging modern C# source generation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: improve exception handling and messaging

Enhances exception classes with more descriptive error messages and improved property names. Updates logger extensions for better diagnostic information and provides clearer feedback when API errors occur.

Changes:
- Enhance CatBoxAPIExceptions with better error messages
- Update exception properties for clarity
- Improve logger extensions with better diagnostics
- Add detailed messages for file size limit violations and invalid request types

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: update request models with enhanced validation

Updates request model classes with improved validation using the refactored Throw helper. Enhances documentation on request properties and standardizes null checks and parameter validation across all request types.

Changes:
- Update IAlbumUploadRequest, EditAlbumRequest, and ModifyAlbumImagesRequest
- Enhance validation in DeleteFileRequest, FileUploadRequest, and StreamUploadRequest
- Update UrlUploadRequest with improved validation
- Ensure consistent error messaging for invalid inputs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: update project configuration and dependencies

Updates project file with new dependencies and build configuration. Removes TaskAsyncEnumerableExtensions.cs as async enumerable handling is now integrated directly into client methods. Updates options class for improved configuration validation.

Changes:
- Update CatBox.NET.csproj with dependency changes
- Delete Extensions/TaskAsyncEnumerableExtensions.cs (functionality moved to clients)
- Update CatboxOptions.cs with improved validation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* test: add comprehensive unit and integration tests

Implements comprehensive test coverage including unit tests with mocked HTTP responses and integration tests against live APIs. Adds test helper classes for creating mock HTTP clients and managing test configuration.

Changes:
- Add CatBoxClientTests.cs and CatBoxClientIntegrationTests.cs
- Add LitterboxClientTests.cs and LitterboxClientIntegrationTests.cs
- Add CommonTests.cs for utility function testing
- Create test helpers (HttpClientTestHelper, IntegrationTestConfig)
- Include test image assets (test-file.png, test-file.svg)
- Add comprehensive test documentation in README
- Remove unused Usings.cs global using directives file
- Update test project configuration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: update sample application with new API patterns

Updates the sample application to demonstrate the refactored API. Shows usage of new request patterns, concrete client types, and enhanced error handling. Updates project dependencies to match library changes and provides practical examples of album creation, file uploads, and error scenarios.

Changes:
- Update Program.cs with examples using refactored API
- Demonstrate new request patterns and error handling
- Update SampleApp.csproj dependencies
- Add practical usage examples for library consumers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: migrate to XML-based solution file

Transitions from legacy .sln format to modern XML-based .slnx solution file format. This provides better merge conflict resolution and human-readability for the solution configuration.

Changes:
- Delete CatBox.NET.sln (legacy format)
- Add CatBox.NET.slnx (modern XML format)
- Improves version control friendliness

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: add IDE and workspace configuration

Adds IDE-specific configuration files for Claude Code, JetBrains Rider, and Visual Studio Code. Configures workspace settings, project structure preferences, and code style rules to improve developer experience across different IDEs.

Changes:
- Add .claude/settings.local.json for Claude Code configuration
- Add .idea/.idea.CatBox.NET/.idea/projectSettingsUpdater.xml for Rider
- Add .vscode/settings.json for Visual Studio Code
- Standardizes development environment setup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: update README with API changes and migration guide

Updates main README to reflect the architectural changes, including removal of interfaces, new request patterns, and updated usage examples. Documents breaking changes and provides migration guidance for users upgrading from previous versions.

Changes:
- Update README with refactored API examples
- Document breaking changes (interface removal, renamed base classes)
- Add migration guidance for existing users
- Update usage examples to reflect new patterns

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add qodana CI checks (#6)

* Add qodana.yaml file

* Add github workflow file

---------

Co-authored-by: Qodana Application <qodana-support@jetbrains.com>

* Update runner to run on version 5

* Use Intellenum TypeConverter

* Update qodana.yaml

* Add slnx file

* Reformatting / re-run qodana

* Add sln file back to satisfy qodana solution?

* Re-run

* fixed???

* Test change 2

* fix .net 10

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: qodana-cloud[bot] <163413896+qodana-cloud[bot]@users.noreply.github.com>
Co-authored-by: Qodana Application <qodana-support@jetbrains.com>
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.

3 participants