-
Notifications
You must be signed in to change notification settings - Fork 121
REST API: Migrate site plugin fetching endpoint #8678
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 all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
a27d7dd
Update SitePluginsMapper to parse contents without the data envelope
itsmeichigo 632d597
Update test for SitePluginsMapper
itsmeichigo 0ab98b6
Enable REST API for the fetch site plugin endpoint
itsmeichigo b57abd9
Update test for SitePluginsMapperTests
itsmeichigo 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
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
74 changes: 74 additions & 0 deletions
74
Networking/NetworkingTests/Responses/plugins-without-data.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| [ | ||
| { | ||
| "plugin": "hello", | ||
| "status": "inactive", | ||
| "name": "Hello Dolly", | ||
| "plugin_uri": "http://wordpress.org/plugins/hello-dolly/", | ||
| "author": "Matt Mullenweg", | ||
| "author_uri": "http://ma.tt/", | ||
| "description": { | ||
| "raw": "This is not just a plugin, it...", | ||
| "rendered": "This is not just a plugin, it symbolizes..." | ||
| }, | ||
| "version": "1.7.2", | ||
| "network_only": false, | ||
| "requires_wp": "", | ||
| "requires_php": "", | ||
| "textdomain": "", | ||
| "_links": { | ||
| "self": [ | ||
| { | ||
| "href": "https://example.com/wp-json/wp/v2/plugins/hello" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| { | ||
| "plugin": "jetpack/jetpack", | ||
| "status": "active", | ||
| "name": "Jetpack by WordPress.com", | ||
| "plugin_uri": "https://jetpack.com", | ||
| "author": "Automattic", | ||
| "author_uri": "https://jetpack.com", | ||
| "description": { | ||
| "raw": "Bring the power of the WordPress.com cloud to your self-hosted WordPress. Jetpack enables you to connect your blog to a WordPress.com account to use the powerful features normally only available to WordPress.com users.", | ||
| "rendered": "Bring the power of the WordPress.com cloud to your self-hosted WordPress. Jetpack enables you to connect your blog to a WordPress.com account to use the powerful features normally only available to WordPress.com users. <cite>By <a href=\"https://jetpack.com\">Automattic</a>.</cite>" | ||
| }, | ||
| "version": "9.5", | ||
| "network_only": false, | ||
| "requires_wp": "5.6", | ||
| "requires_php": "5.6", | ||
| "textdomain": "jetpack", | ||
| "_links": { | ||
| "self": [ | ||
| { | ||
| "href": "https://example.com/wp-json/wp/v2/plugins/jetpack/jetpack" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| { | ||
| "plugin": "woocommerce/woocommerce", | ||
| "status": "active", | ||
| "name": "WooCommerce", | ||
| "plugin_uri": "https://woocommerce.com/", | ||
| "author": "Automattic", | ||
| "author_uri": "https://woocommerce.com", | ||
| "description": { | ||
| "raw": "An eCommerce toolkit that helps you sell anything. Beautifully.", | ||
| "rendered": "An eCommerce toolkit that helps you sell anything. Beautifully. <cite>By <a href=\"https://woocommerce.com\">Automattic</a>.</cite>" | ||
| }, | ||
| "version": "5.1.0", | ||
| "network_only": false, | ||
| "requires_wp": "5.4", | ||
| "requires_php": "7.0", | ||
| "textdomain": "woocommerce", | ||
| "_links": { | ||
| "self": [ | ||
| { | ||
| "href": "https://example.com//wp-json/wp/v2/plugins/woocommerce/woocommerce" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ] |
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.
The PR description mentioned that other endpoints aren't converted because we're not supporting Jetpack installation for REST login. I remember we implemented WooCommerce plugin installation, does that use a different endpoint? Do we plan to support Jetpack installation in the future, with a similar upsell to JCP sites?
Uh oh!
There was an error while loading. Please reload this page.
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.
We implemented Woo installation in a web view only - we want to handle that natively but haven't gotten around to doing that yet. Similarly, we want to support Jetpack installation after the first iteration of the REST API project is shipped, so we'll migrate the rest of the endpoints then.