[wp-hackers] Wordpress Plugin API

Dion Hulse (dd32) wordpress at dd32.id.au
Fri Nov 30 07:21:49 UTC 2012


When some official docs are written, if ever, then yes, until then, no.
The docs posted there are a copy-paste from a wp-hackers email reply
many many many months ago, and are since out of date.
And since the API isn't designed to be used by anything other than
Core really, there haven't been any official docs written.

On 30 November 2012 18:13, Mike Schinkel <mike at newclarity.net> wrote:
> Hey Dion,
>
> When you visit the API URL[1] in your browser is has a link for API Docs which when clicked says "If only I had written some.. Sorry! -DD32"
>
> Since it appears you have since written some docs[2], any chance of linking those to ease the journey for future API travelers?
>
> -Mike
> [1] http://api.wordpress.org/plugins/info/1.0/
> [2] http://dd32.id.au/projects/wordpressorg-plugin-information-api-docs/
>
> On Nov 29, 2012, at 8:50 PM, Dion Hulse (dd32) <wordpress at dd32.id.au> wrote:
>
>> 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
>> the API.
>>
>> 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:
>>> 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
>>> _______________________________________________
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list