Virgin Money Giving API
About
This is a 3rd party API providing data and alternative widgets for Virgin Money Giving events.
Data provided via the API include variables such as, Donation amount, Gift Aid amount, Charity, Donations (including messages, names, dates & amounts from users)... more details in the API section.
For any queries about how to use this, or any other comments/suggestions/feedback please contact me at jo@easyjo.com or tweet me @easyjo
Virgin Money Giving widgets
You can view you automatically generated widget like this:
<img src="http://api.jo.je/virginmoneygiving/view/59024">
You can find your page ID by clicking your donate button, the page ID will appear in the url, for example:
https://uk.virginmoneygiving.com/fundraiser-web/donate/makeDonationForFundraiserDisplay.action?fundraiserActivityId=XXXXXX
And replace '59024' with your virgin money giving page id
Virgin Money Giving API
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.
The following example only shows one donation, although the live feeds show the 30 most recent donation messages
{
"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"
}
An indented version of all the data provided for an event is shown here.. JSON Data.
This can be decided in PHP5+ using json_decode()
JSONP - for inline Javascript usage
If you're like to use the code directly with javascript, you'll need to use the JSONP version.
The URL for JSONP data is provided below
http://api.jo.je/virginmoneygiving/jsonp.php?d=59024&callback=?
Simple Demo
This simple demo shows how you can use JQuery and the JSONP feed to display data on your domain
Demo with donation messages
This demo shows how to display the total raised, and the previous 6 donation messages
FAQ
What can I use this for?
Anything you want, your own website, another Virgin Money Giving service or aggregate... If you use the API for something interesting, please let me know, it's great to see it in use!
Is there a rate limit?
No, although if you think you may be hitting the service more than 1,000 times in a 24 period please let me know to discuss requirements.
Do you cache?
Yes, we have a local cache that lasts for 5 hours, if you would like more up to date data, please drop me an email to discuss requirements.
Is this affliated to Virgin Money Giving?
No, this is totally unrelated to Virgin Money Giving, although we have been in touch with them, an API is planned for the future, for the moment this will have to do!
Can you help me with some code?
Sure, drop drop me an email and I'll see if I can help.
Created by jo.je