WordPress.org

Make WordPress Core

Opened 12 years ago

Closed 5 years ago

Last modified 5 years ago

#10514 closed enhancement (worksforme)

Allow plugins to advertise its XML APIs in RSD

Reported by: sirzooro Owned by: josephscott
Milestone: Priority: normal
Severity: normal Version:
Component: XML-RPC Keywords: has-patch needs-refresh
Focuses: Cc:

Description

It will be nice if plugins could advertise its APIs in RSD.

Attachments (2)

xmlrpc.php.diff (2.3 KB) - added by sirzooro 12 years ago.
xmlrpc.php.2.diff (2.4 KB) - added by sirzooro 12 years ago.
Escape attributes using esc_attr()

Download all attachments as: .zip

Change History (18)

@sirzooro
12 years ago

#1 @josephscott
12 years ago

  • Cc joseph@… added

I'm curious to know what other APIs besides XML-RPC and AtomPub would plugins likely be using that do discovery via RSD?

#2 @sirzooro
12 years ago

I think of APIs developed for particular plugin only. At this moment plugins can add register new XML RPC methods using xmlrpc_methods hook. Unfortunately the only way to check from outside if blog supports them is to call one of them and check if call succeeded. This is not a problem (except for performance) if plugin provides some kind of "get" method. But if it adds "set" methods only, this approach is not good. Therefore ability to publish these APIs in RSD is a logical next step.

#3 @westi
12 years ago

  • Cc westi added

#4 @josephscott
12 years ago

You can get a list of available XML-RPC methods by calling the system.listMethods XML-RPC method. This returns all of the available XML-RPC methods for that end point, including ones added by a plugin.

#5 @ryan
12 years ago

  • Milestone changed from 2.9 to Future Release

#6 follow-up: @josephscott
12 years ago

I've been thinking about this again. Although the specific use case that was mentioned (adding XML-RPC methods) isn't really applicable there are other cases where using RSD for alternative API discovery powered by plugins would be desirable.

For instance on WordPress.com we advertise the Twitter API in the RSD.

#7 in reply to: ↑ 6 @westi
12 years ago

Replying to josephscott:

I've been thinking about this again. Although the specific use case that was mentioned (adding XML-RPC methods) isn't really applicable there are other cases where using RSD for alternative API discovery powered by plugins would be desirable.

For instance on WordPress.com we advertise the Twitter API in the RSD.

This sounds reasonable.

I wonder if the current patch isn't the best solution.

Would it not be better to have an action/filter just for additive changes?

#8 @sirzooro
12 years ago

I think that current approach gives more flexibility - someone may decide to remove some APIs from RDS.

BTW, I found that it will be good to use esc_attr() - I will upload new patch soon.

@sirzooro
12 years ago

Escape attributes using esc_attr()

#9 @markoheijnen
9 years ago

I looked at the patch and I do think the current approach is better then do it for additive changes.

I would say change the filter from xmlrpc_apis to rsd_apis because it isn't XML_RPC only. Also passing the XML_RPC url is weird.

#10 @chriscct7
6 years ago

  • Keywords needs-refresh added

#11 @markoheijnen
6 years ago

  • Keywords close added

Is this still needed or should we close it? After more then 6 years and with the REST API partly in, I believe it's fine to close it.

#12 @chriscct7
6 years ago

  • Keywords close removed

The REST API doesn't replace XMLRPC. XMLRPC will be continued to be maintained, and this ticket provides useful functionality

#13 @markoheijnen
6 years ago

I'm not saying that the XML-RPC is getting replaced/removed. I do think people will focus more on adding things through the REST API instead of the XML-RPC.

I'm now looking at all the XML-RPC tickets to reduce them even more in this release. So 3-6 years ago I agreed that this is a useful but now not that much anymore. That said, if a committer says it will be committed with a refreshed patch, then I'm happy to work on that.

This ticket was mentioned in Slack in #mobile by markoheijnen. View the logs.


5 years ago

#15 @markoheijnen
5 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Closing it as there is no traction or need to have this functionality now.

#16 @netweb
5 years ago

  • Milestone Future Release deleted
Note: See TracTickets for help on using tickets.