[wp-hackers] Wordpress Plugin API
Dion Hulse (dd32)
wordpress at dd32.id.au
Fri Nov 30 01:50:58 UTC 2012
The fields arguement is not designed to be used to turn all of the
fields on and off, It's a incredibly simple API thats only designed
for core's usage of it.
Only certain fields can be turned on/off by that argument, as
mentioned in the documentation links you've mentioned, although
they're somewhat out of date now as extra things have been added to
Adding 'compatibility' => false, 'short_description' => false, to the
list will also reduce the payload of the data you're requesting
significantly. I also notice you're sending a lot of fieldnames which
are not for the Plugin API (But appear to be for the Themes API) so
that's not helping either..
In short.. Yes, The API is working as expected, Remove a bunch of
those field requirements from your call and you'll get back even more
data than you are currently getting.. but there isn't an option to
just get a list of slugs.
On 30 November 2012 10:59, Luke Bryan <lukebryan at sharefaith.com> wrote:
> I'm having some trouble using the api as described here:
> I'm using:
> $browseargs = array(
> 'search' => $args->search,
> 'fields' => array(
> 'slug' => TRUE )
> $request = wp_remote_post('http://api.wordpress.org/plugins/info/1.0/',
> array( 'timeout' => 15, 'body' => array('action' => $action, 'request' =>
> ... and requesting it as described in the link above.
> I'm trying to just get the slug for plugins, and while I've been able to
> expand search to return many, many plugins, the fields parameter isn't
> doing what it says it does on the documentation. It always sends back the
> full name, slug, version... in a slower long response. I'm wondering, has
> this parameter been renamed?
> Best regards,
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers