Virgin Money Giving API and Widgets

As a followup to an unofficial API I wrote for Justgiving in 2009, which has recently been replaced with an official version I'm now releasing an unofficial API for Virgin Money Giving which I have been using for a VMG powered app for a while.

Virgin Money Giving widgets (unofficial)

You can view you automatically generated widget like this:

<img src="http://api.jo.je/virginmoneygiving/view/59024">

And replace paras10 with your virgin money giving page id

For events without targets, they will look like this:

<img border=0 src="http://api.jo.je/virginmoneygiving/view/22895"></a>

or for a forum.... [img]http://api.jo.je/virginmoneygiving/view/22895[/img]

Virgin Money Giving (unofficial)

For any developers out there who want a quick way to get data about an event, more than provided by the RSS data, here's a JSON feed you can use (replace '59024' as needed):

http://api.jo.je/virginmoneygiving/data/59024

Which provides the following, in JSON format:

{
"title":"AliceJohnson&pageUrl=2",
"image":"http:\/\/uk.virginmoneygiving.com\/\/fundraiser-web\/donate\/downloadImage.action?fileName=\/167x18792353cbc-6d25-4654-babe-45ba9bf69d9b.bmp",
"person":"Alice Johnson",
"donations":[
{
"person":"Rob",
"amount":"10.00",
"gift_aid":0,
"date":"01.12.10",
"message":"I donate at least three pints of Guinness.."
}
],
"charity":"Link Community Development",
"is_live":true,
"money_target":"350.00",
"money_total":"268.00",
"money_gift_aid":62.89,
"money_offline":"0.00",
"money_online":268,
"event_id":"59024",
"has_target":true,
"percentage_complete":76,
"is_valid":true,
"pub_date":"2011-03-12 00:00:00",
"extra_title":"Alice Johnson's fundraising page"
}

This can be decided in PHP5+ using json_decode()

site here: http://api.jo.je/virginmoneygiving/

If you plan or using this for anything, please feel free, and drop me a message or comment!

3 Comments to “Virgin Money Giving API and Widgets”

  1. [...] This post was mentioned on Twitter by Joel Richards, JustCharity.org. JustCharity.org said: RT @easyjo: Quick blog post about @vmgiving api and how to use it: http://www.easyjo.com/2011/02/02/virgin-money-giving-api-and-widgets [...]

  2. Dave says:

    Hi
    The widget was working for us but then suddenly stopped,

    Found out it is due to the account number you add to the end of the img url needs to have an extra zero in front of it because there are now over 100000 registered accounts so any number below 100000 needs the extra zero

    Thanks

Leave a Reply

Message