Skip to content

Commit 0a5ee6d

Browse files
committed
Merge pull request #9 from ShootProof/create-event-event-date-support
Added event_date support to Sp_Api::createEvent().
2 parents c1c27f6 + e7479a0 commit 0a5ee6d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lib/Sp_Api.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,10 @@ public function getEvents($brandId = null)
103103
*
104104
* @param string $eventName
105105
* @param integer $brandId Brand ID to create event in; optional.
106+
* @param string $eventDate Date of Event (aka "Shoot Date"); optional.
106107
* @return array
107108
*/
108-
public function createEvent($eventName, $brandId = null)
109+
public function createEvent($eventName, $brandId = null, $eventDate = null)
109110
{
110111
if (is_null($eventName) || $eventName == '') {
111112
throw new Exception('The eventName is required to create a new event.');
@@ -120,6 +121,10 @@ public function createEvent($eventName, $brandId = null)
120121
$params['brand_id'] = $brandId;
121122
}
122123

124+
if (strlen($eventDate) > 0) {
125+
$params['event_date'] = $eventDate;
126+
}
127+
123128
return $this->_makeApiRequest($params);
124129
}
125130

lib/Sp_Lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Sp_Lib
1212
*
1313
* @var string
1414
*/
15-
protected $_version = 'php-1.6.0';
15+
protected $_version = 'php-1.6.1';
1616

1717
/**
1818
* Wrapper method to make an api request

0 commit comments

Comments
 (0)