Skip to content

Instantly share code, notes, and snippets.

@pawelsawicz
Created January 14, 2015 16:29
Show Gist options
  • Save pawelsawicz/2b6e1e8896db51e42e64 to your computer and use it in GitHub Desktop.
Save pawelsawicz/2b6e1e8896db51e42e64 to your computer and use it in GitHub Desktop.
RegisterEvent example in PHP
<?php
include_once 'JustGivingClient.php';
include_once 'ApiClients/Model/Event.php';
$client = new JustGivingClient("https://api-sandbox.justgiving.com/", "appId", 1,
"user", "password");
$event = new Event();
$event->name = "Playing Mario for 48 hours for charity";
$event->description = "This is an event description";
$event->completionDate = "/Date(1437060163998+0100)/";
$event->expiryDate = "/Date(1437060163998+0100)/";
$event->startDate = "/Date(1405696963998+0100)/";
$event->eventType = "OtherCelebration";
$event->location = "Test Location";
$response = $client->Event->Create($event);
echo $response->next->rel;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment