[wp-hackers] Reviews for Plugins
Ryan Frankel
ryan.frankel at gmail.com
Tue Nov 1 23:57:56 UTC 2011
So, it looks like something like this works. You can pull all of the plugin info from the API. This returns a list of 16,875 plugins. Please note: this code isn't quite the correct code (the foreach) but it does seem to show something like this is possible. For anyone who cares.
---
add_shortcode( 'wordpress_api', 'wordpress_api_shortcode' );
function wordpress_api_shortcode( $atts ) {
extract( shortcode_atts( array(
), $atts ) );
$payload = array(
'action' => 'query_plugins',
'request' => serialize(
(object)array(
'search' => ''
)
)
);
$body = wp_remote_post( 'http://api.wordpress.org/plugins/info/1.0/', array( 'body' => $payload) );
?>
<h2>Info: http://dd32.id.au/projects/wordpressorg-plugin-information-api-docs/</h2>
<?php
$stringData = unserialize($body['body']);
foreach ($stringData as $plugin) {
print_r($plugin);
exit;
}
}
ryan
On Nov 1, 2011, at 6:49 PM, Andy Charrington-Wilden wrote:
> Yeah, pulling all data may be a bit different. Perhaps someone on here knows a little more about that API?
>
> Sent from my iPhone
>
> On 1 Nov 2011, at 22:45, Ryan Frankel <ryan.frankel at gmail.com> wrote:
>
>> On second thought….I will have to take a closer look at what you can get via that API. It's clear you can pull specific info about a plugin from the repo but it's not clear if you can pull ALL data like this or any sort of daily 'new plugins' data.
>>
>> ryan
>>
>>
>> On Nov 1, 2011, at 6:36 PM, Andy Charrington-Wilden wrote:
>>
>>>
>>>> This may sound dumb but IF it was possible to poll the repo and see what plugins are available you could recreate the search engine (similar to wp.org). That way, if a user wanted to find a plugin they could navigate to the site, do a search, find a plugin and be sent over to the wp.org site. This could include any type of 'rating' you wanted. Again, I am just throwing this out there.
>>>>
>>>> ryan
>>>
>>> A bit like this?
>>>
>>> http://ckon.wordpress.com/2010/07/20/undocumented-wordpress-org-plugin-api/
>>>>
>>>>
>>>>
>>>> On Nov 1, 2011, at 6:14 PM, Andy Charrington-Wilden wrote:
>>>>
>>>>> How about allowing plugin devs to include their rating in the plugin name? Dynamically. Only problem there is it looks a bit shit and the details before downloading would still come from the readme on .org (right?)
>>>>>
>>>>> Sent from my iPhone
>>>>>
>>>>> On 1 Nov 2011, at 22:08, Ryan Frankel <ryan.frankel at gmail.com> wrote:
>>>>>
>>>>>> They wouldn't have to submit their plugin. You would just have a WP plugin like 'Review Plugin' that if you installed it you could rate whatever plugins you had installed (with amazing authentication =). No SVN or GIT or whatever needed. The reviews would get aggregated by the server and possibly supply links to the WordPress repo.
>>>>>>
>>>>>> My main issue with something like this is how Users would get to see it BEFORE they download plugins. There is not real feedback mechanism.
>>>>>>
>>>>>> Ryan
>>>>>>
>>>>>> On Nov 1, 2011, at 6:03 PM, Paul Menard wrote:
>>>>>>
>>>>>>>
>>>>>>> On Nov 1, 2011, at 5:45 PM, Andy Charrington-Wilden wrote:
>>>>>>>
>>>>>>>> How about a separate web service that plugin devs could submit their plugin to with an API
>>>>>>>
>>>>>>> Um what? We don't need to change the current SVN plugin submission process. This is another dead horse beat to death a few months ago when someone ranted on about moving from SVN go Git. Technically I think SVN can be considered a web service with a published API.
>>>>>>>
>>>>>>> P-
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> 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
>>>>
>>>> _______________________________________________
>>>> 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
> _______________________________________________
> 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