Skip to content

Close #10: Fetch Quota Information#36

Merged
i2h3 merged 1 commit intomainfrom
10-quota
Jan 7, 2026
Merged

Close #10: Fetch Quota Information#36
i2h3 merged 1 commit intomainfrom
10-quota

Conversation

@i2h3
Copy link
Copy Markdown
Owner

@i2h3 i2h3 commented Jan 5, 2026

  • Introduced Quota and AvailableQuota models for directory properties.
  • Extended Item model accordingly.
  • Extended ResponseParser accordingly to consider optional quota information.
  • Refactored Listing request body to now include quota information, sorted and empty tags for improved readability.

@i2h3 i2h3 added this to the 2.0.0 milestone Jan 5, 2026
@i2h3 i2h3 requested a review from Copilot January 5, 2026 12:25
@i2h3 i2h3 self-assigned this Jan 5, 2026
@i2h3 i2h3 added the enhancement New feature or request label Jan 5, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements quota information fetching for directories as outlined in issue #10. The changes introduce new models (Quota and AvailableQuota) to represent directory storage restrictions and usage, extend the Item model to include quota data, and update the response parser to handle optional quota information from WebDAV responses.

  • Introduced Quota and AvailableQuota models for directory storage information
  • Extended Item model with optional quota property for directories
  • Updated ResponseParser to parse quota fields from WebDAV responses
  • Refactored test infrastructure with separate Headers and Body files for better testing
  • Enhanced error handling with unexpectedStatus case

Reviewed changes

Copilot reviewed 33 out of 54 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Sources/Rainmaker/Models/AvailableQuota.swift New model defining quota availability states (limited, unlimited, unknown, uncomputed)
Sources/Rainmaker/Models/Quota.swift New model containing available and used quota information
Sources/Rainmaker/Models/Item.swift Extended with optional quota property and improved documentation
Sources/Rainmaker/Responses/ResponseParser.swift Added parsing logic for quota-used-bytes and quota-available-bytes
Sources/Rainmaker/Requests/Bodies/Listing.xml Added quota property requests and sorted properties for readability
Sources/Rainmaker/Server.swift Added HTTP response status validation for listing requests
Sources/Rainmaker/RainmakerError.swift Added unexpectedStatus error case
Tests/RainmakerTests/URLTestSession.swift Refactored to separate Headers and Body files; renamed resourcePath to testResources
Tests/RainmakerTests/Extensions/HTTPURLResponse+init.swift New test helper for creating HTTPURLResponse from fixture files
Tests/RainmakerTests/RainmakerTestsError.swift New error types for test infrastructure
Various test fixture files Added Headers.txt and Body.xml/json files for all test scenarios

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 7, 2026

@i2h3 I've opened a new pull request, #37, to work on those changes. Once the pull request is ready, I'll request review from you.

- Introduced Quota and AvailableQuota models for directory properties.
- Extended Item model accordingly.
- Extended ResponseParser accordingly to consider optional quota information.
- Refactored Listing request body to now include quota information, sorted and empty tags for improved readability.
@i2h3 i2h3 merged commit afd3ed4 into main Jan 7, 2026
7 checks passed
@i2h3 i2h3 deleted the 10-quota branch January 7, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants