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.');
        }

        $params = array(
            'method' => 'sp.event.create',
            'event_name' => $eventName
        );

        if (strlen($brandId) > 0) {
            $params['brand_id'] = $brandId;
        }

        if (strlen($eventDate) > 0) {
            $params['event_date'] = $eventDate;
        }

        return $this->_makeApiRequest($params);
    }
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.');
        }

        $params = array(
            'method' => 'sp.event.create',
            'event_name' => $eventName
        );

        if (strlen($brandId) > 0) {
            $params['brand_id'] = $brandId;
        }

        if (strlen($eventDate) > 0) {
            $params['event_date'] = $eventDate;
        }

        return $this->_makeApiRequest($params);
    }
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.' ) ; } $ params = array ( 'method' => 'sp.event.create' , 'event_name' => $ eventName ) ; if ( strlen ( $ brandId ) > 0 ) { $ params [ 'brand_id' ] = $ brandId ; } if ( strlen ( $ eventDate ) > 0 ) { $ params [ 'event_date' ] = $ eventDate ; } return $ this -> _makeApiRequest ( $ params ) ; }
Method to create a new event.

If no $brandId is provided, the event will be placed within the
studio's default brand.

@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
Method to create a new event .