[wp-hackers] Wordpress Plugin API

Luke Bryan lukebryan at sharefaith.com
Thu Nov 29 23:59:36 UTC 2012


Greetings,

I'm having some trouble using the api as described here:
http://dd32.id.au/projects/wordpressorg-plugin-information-api-docs/
http://wp.tutsplus.com/tutorials/creative-coding/interacting-with-wordpress-plug-in-theme-api/

I'm using:
    $browseargs = array(
        'search' => $args->search,
        'fields' => array(
            'version'=>false,
            'author'=>false,
            'preview_url'=>FALSE,
            'screenshot_url'=>FALSE,
            'screenshot_count'=>FALSE,
            'screenshots'=>FALSE,
            'rating'=>FALSE,
            'num_ratings'=>FALSE,
            'downloaded'=>FALSE,
            'sections'=>FALSE,
            'description'=>FALSE,
            'download_link'=>FALSE,
            'slug'   => TRUE         )
    );

    $request = wp_remote_post('http://api.wordpress.org/plugins/info/1.0/',
array( 'timeout' => 15, 'body' => array('action' => $action, 'request' =>
serialize((object)$browseargs))));
... 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,
Luke


More information about the wp-hackers mailing list