blog:// Plugin Information API Docs

In response to: “If only I had written some.. Sorry! -DD32” – My tagline i left in the Plugins API for WordPress

(This was a copy-paste job from an email i sent to the wp-hackers list:

Some basic documentation for the Plugins API:

Note: The request should look something similar to this: $_POST[‘action’] = The action to perform, $_POST[‘body’] => A Serialized Object (with properties which are explained below). The return values from the API should be a Object in all cases (Except if you visit it via a browser with a GET request with no valid action, Then it’ll return the bbPress friendly page)




Accepts an object with a property of either:
browse – A bbPress View to “browse”, eg, “popular” =
search – The term to search for
tag – Browse by a tag
author – Browse by an author (Note: .org has a few plugins to extend the author search to include contributors/etc)

Other properties which the object can have:
page – the page of the results (duh..)
per_page – the number of results per page
fields – This is a bit.. odd.. an array of which fields to return, the API has defaults for requests, but it can be overridden from the client, send an array with the field as the key, and true|false as the value to return or not, The fields are: ‘description’, ‘sections’, ‘tested’ ,’requires’, ‘rating’, ‘downloaded’, ‘downloadlink’, ‘last_updated’ , ‘homepage’, ‘tags’

return array of objects:

An array of the same object that plugin_information returns


Takes an object with the property:
slug – The slug of the plugin to return the info for
fields – once again, Optional, Same deal as in the previous action, just its got different defaults (ie. this one will return all the sections of the readme, whilst the previous will only return the short description)

return object:

name – The plugins name
slug – the plugins slug
version – The latest version
author – The Author of the plugin – If a URL is available for the author, This will be a link

The following fields are optional, And are returned based on the fields param
requires – The required WordPress version
tested – The highest tested compatible WordPress version
rating – returns the % rating (ie, 10%, 100%) as a number.  (This is displayed on .org as a 1-5 scale)
num_ratings – If ratings is requested, this will be returned as well, Its the number of people that have rated the plugin
downloads – the number of times the plugin has been downloaded
last_updated – the date that the plugin was last updated, Excludes the time
homepage – The URL of the plugin
description – The short description of the plugin(s)
sections – An array of readme sections, ie. array( ‘faq’ => ‘FAQ… blah blah my plugin is great.. blah blah’, ‘installing’ => ‘fgfg…. If no readme sections are found, It returns  array(‘description’ => (description field here from above) )
downloadlink – The Download Link for the plugin (Theres a bug in this at present, Any version with a space in the URL returns the wrong URL: #8610
tags – an array of array( ‘tag_slug’ => ‘Tag Name, ‘slug2’ => ‘Pretty Butterflies’)hot_tags

Takes an object of:
number – The number of tags to return, Defaults to 100

return array of objects: (key will be tag slug)

name – The tags name
slug – The tags slug
count – The number of plugins

Final note, The API may also return an error object in the case of an error, It’ll be an object with a single property:
error – A Error string, ie. “Slug not provided” or “action not implemented”