Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve how the result count headers get output #69

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

johnbillion
Copy link
Member

Work in progress.

In #49 support for the X-WP-Total and X-WP-TotalPages headers was added. There are a few improvements that can be made:

  • The headers should be output by the Ajax handler, not the provider
  • There should be no need for the provider to return the posts per page value as this is provided by the arguments
  • The MediaList class can handle this instead of needing an additional MediaResponse class

Copy link
Contributor

@roborourke roborourke left a comment

Choose a reason for hiding this comment

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

What was left to do here? Looks good as it is. Will need to coordinate releases with the unsplash and WP providers due to breaking changes again.

I think this is good, not sure why I didn't implement it using the MediaList class or think about the ajax handler sending the headers.

@johnbillion johnbillion marked this pull request as ready for review February 6, 2024 13:33
@johnbillion
Copy link
Member Author

I don't think there's anything left to do here other than testing and, as you pointed out, to get any other providers updated as necessary.

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