It does not seem to be used anywhere, and I'm not sure why we should provide this.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Dave Reid’s picture

Looks like media_youtube does in fact use this function. :/

Devin Carlson’s picture

Status: Active » Needs review
FileSize
6 KB

Since Media: YouTube is the only module using the XML media cache, and the cache only works with XML, I think that the XML APIs should be removed from Media. I'd also be happy to port all of the XML-related code over to Media: YouTube.

Attached is a patch to remove the XML APIs and drop the cache tables.

Devin Carlson’s picture

After doing some searching it looks like Media: YouTube is the only contrib module which is using the XML APIs and, even then, it is only calling media_retrieve_xml() once. The function is mentioned in a few different provider modules (YouTube, Vimeo) but only in comments which suggest that the function does not currently meet their needs but should be used in the future if it is even "improved".

I opened an issue against Media: YouTube to do its own XML processing (#2068017: Use own XML functions to allow XML APIs to be removed from Media) so it should be okay to remove the XML APIs from Media now.

aaron’s picture

Here is a reroll chasing HEAD

aaron’s picture

Oops, here is the real patch.

Devin Carlson’s picture

An updated patch to accommodate the latest changes.

Devin Carlson’s picture

Status: Needs review » Fixed

Tested the updated #7 and didn't run into any problems. I'll make corresponding commit to Media: YouTube.

Committed to Media 7.x-2.x.

DamienMcKenna’s picture

FYI, as it turned out Media:Flickr used it too: #2089665: Media v2 removed XML APIs, update module

DamienMcKenna’s picture

BTW the following comment needs to be updated to the Drupal coding standards:

    //if request wasn't successful, create object for return to avoid errors

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.