From 333d35e117428c9c7bf841d673fd0c13b696cb52 Mon Sep 17 00:00:00 2001 From: Brian DeShong Date: Mon, 23 Mar 2015 12:28:05 +0000 Subject: [PATCH 1/2] Added event_date support to Sp_Api::createEvent(). --- lib/Sp_Api.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/Sp_Api.php b/lib/Sp_Api.php index 03face5..d381e41 100644 --- a/lib/Sp_Api.php +++ b/lib/Sp_Api.php @@ -103,9 +103,10 @@ public function getEvents($brandId = null) * * @param string $eventName * @param integer $brandId Brand ID to create event in; optional. + * @param string $eventDate Date of Event (aka "Shoot Date"); optional. * @return array */ - public function createEvent($eventName, $brandId = null) + public function createEvent($eventName, $brandId = null, $eventDate = null) { if (is_null($eventName) || $eventName == '') { throw new Exception('The eventName is required to create a new event.'); @@ -120,6 +121,10 @@ public function createEvent($eventName, $brandId = null) $params['brand_id'] = $brandId; } + if (strlen($eventDate) > 0) { + $params['event_date'] = $eventDate; + } + return $this->_makeApiRequest($params); } From e7479a08b7b09729a201b77b0fcebb6786b7a05a Mon Sep 17 00:00:00 2001 From: Brian DeShong Date: Mon, 23 Mar 2015 12:30:40 +0000 Subject: [PATCH 2/2] Bumping Sp_Lib version number. --- lib/Sp_Lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Sp_Lib.php b/lib/Sp_Lib.php index 3210e61..4867a89 100644 --- a/lib/Sp_Lib.php +++ b/lib/Sp_Lib.php @@ -12,7 +12,7 @@ class Sp_Lib * * @var string */ - protected $_version = 'php-1.6.0'; + protected $_version = 'php-1.6.1'; /** * Wrapper method to make an api request