[wp-hackers] api.wordpress.org/themes ?

DD32 wordpress at dd32.id.au
Mon Jan 12 07:26:02 GMT 2009

You want it now-now-now? Seriously, It'll be hitting trunk within the
next month.. I'm just waiting on some UI direction before submitting a
patch to trac for it.

The API probably has bugs and yes, you've jumped the gun :P, Because
i've not written the front end, so i've hard-coded the theme URL's for
now.. so the API hasnt really had a good testing.. (Infact, I dont
think its had any testing.. other than that it seemed to return the
useful results -- I didnt write it), The reason the URL's wrong, is
because it was a copy-paste of the plugin API code, the plugins and
theme URL types seem different :)

The Version of the API you're using depends on the URL for the actual
request, ie. http://api.wordpress.org/themes/info/1.0/ or
http://api.wordpress.org/themes/info/1.1/ (for a as yet, non-existant
version of the API)

Also, If you're defining any non-WP functions, it'd be appreciated if
you can prefix them with something, just so any Core function dont end
up conflicting with your plugin :) (I cant remember if themes_api() is
in trunk atm)

2009/1/12 Jason DeVelvis <sales at emailappeal.com>:
> I'm trying to code a themes installer plugin, similar to the plugin
> installer in the core (I know, I know, it'll probably be in 2.8, but I want
> it now...) and I've got it to do everything except find the proper theme
> .zip file.
> The API returns a download URL like
> http://downloads.wordpress.org/theme/openair.zip which returns a 404... The
> actual extend download URL for openair is
> http://wordpress.org/extend/themes/download/openair.1.1.7.zip
> Any ideas why the API download URLs are invalid? Did I jump into the API too
> early :) Could it be easily fixed so my plugin works? Or is there something
> else going on in my code if the API is returning the wrong d/l links?
> Here's the serialized api info for this call:
> O:8:"stdClass":13:{s:4:"name";s:7:"OpenAir";s:4:"slug";s:7:"openair";s:7:"ve
> rsion";N;s:6:"author";N;s:8:"requires";N;s:6:"tested";N;s:6:"rating";d:32;s:
> 11:"num_ratings";i:25;s:10:"downloaded";N;s:12:"last_updated";s:10:"2009-01-
> 07";s:8:"homepage";N;s:13:"download_link";s:48:"http://downloads.wordpress.o
> rg/theme/openair.zip";s:4:"tags";a:6:{s:19:"threaded-comments-1";s:17:"threa
> ded-comments";s:15:"right-sidebar-2";s:13:"right-sidebar";s:13:"fixed-width-
> 1";s:11:"fixed-width";s:5:"white";s:5:"white";s:4:"blue";s:4:"blue";s:13:"tw
> o-columns-1";s:11:"two-columns";}}
> Note, that api info is obtained with this line of code:
> $api = themes_api('theme_information', array('slug' => $theme, 'fields' =>
> array('sections' => false) ) ); //Save on a bit of bandwidth.
> (where $theme = the slug I retrieved earlier in the process, which is
> 'openair')
> Coincidentally, there is no version # passed with the api call either. Could
> be the same problem?
> Any help would be tremendous!
> Thanks,
> Jason
> _______________________________________________
> 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