-
Notifications
You must be signed in to change notification settings - Fork 121
[Media Library] Update parameter key for number of items to fetch to be per_page
#14444
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
71aff86
Update parameter key for number of items to fetch to be `per_page`
hafizrahman 15196e0
Update release notes.
hafizrahman 7215568
Differentiate parameter between dotcom API and dotorg API.
hafizrahman ec31e45
Merge branch 'trunk' into issue/14432-media-library-missing-images
hafizrahman 02bd74d
Update .org API to use media_type instead of mime_type
hafizrahman 43c0679
Update comments
hafizrahman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this, @hafizrahman! I will wait for @hichamboushaba to review this.
I am jumping in as this parameter key change will affect both
loadMediaLibraryandloadMediaLibraryFromWordPressSitemethods in thisMediaRemotefile.The
numberparameter key is from the following documentation. https://developer.wordpress.com/docs/api/1.2/get/sites/%24site/media/Please make sure to test the following login cases and update the PR testing instructions accordingly.
I am afraid that one of the above cases could be broken/affected by this change.
Nice to have: It would be nice to add a unit test to ensure that the parameter key is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh good catch, I tested in WordPress.com console and indeed it wants
number. Let me refactor this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in 7215568
Good for another review.