[wp-hackers] Accessing Update Check API Outside of WordPress

chris mccoy chris at lod.com
Tue Nov 20 13:44:59 UTC 2012


Also a neat rubygem called jgrep.

chris at sorry:~$ curl -s
http://api.wordpress.org/plugins/info/1.0/add-email-signature.json | jgrep
-s version
1.0.2
chris at sorry:~$

https://github.com/ploubser/JSON-Grep



-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of David Anderson
Sent: November 20, 2012 8:12 AM
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] Accessing Update Check API Outside of WordPress


On 20/11/12 16:00, David Anderson wrote:
>
> JSON is similar, but less complex and easier to write a parser for, 
> but still a long job. I hadn't realised that api.wordpress.org output 
> JSON until Andrew mentioned it yesterday - I'd only know of the 
> serialized and XML. Now I've Googled, it seems that there is a 
> MIT-licensed pure-shell parser for JSON, here which I'm about to
> investigate: https://github.com/dominictarr/JSON.sh. Looks promising.
>

In case anyone else is interested, it's a clever bit of work - and 
suprisingly compact. Very awk-able:

# curl -s 
http://api.wordpress.org/plugins/info/1.0/add-email-signature.json | 
./JSON.sh | head
["name"]        "Add Email Signature"
["slug"]        "add-email-signature"
["version"]     "1.0.2"
["author"]      "<a href=\"http:\/\/david.dw-perspective.org.uk\">David 
Anderson<\/a>"
["author_profile"] "http:\/\/profiles.wordpress.org\/davidanderson"
["contributors","David Anderson"] 
"http:\/\/profiles.wordpress.org\/davidanderson"
["contributors"]        {"David 
Anderson":"http:\/\/profiles.wordpress.org\/davidanderson"}
["requires"]    "3.2"
["tested"]      "3.5"
["compatibility","3.4.2","1.0",0]       100


David

-- 
WordShell - WordPress fast from the CLI - www.wordshell.net

_______________________________________________
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