public function __construct($clientId, $appSecret, $redirect) { //argument test Eden_Eventbrite_Error::i()->argument(1, 'string')->argument(2, 'string')->argument(3, 'string'); //Argument 3 must be a string parent::__construct($clientId, $appSecret, $redirect, self::REQUEST_URL, self::ACCESS_URL); }
/** * Updates an organizer * * @param int * @param string * @param string|null * @return array */ public function update($id, $name, $description = NULL) { //Argument Test Eden_Eventbrite_Error::i()->argument(1, 'int')->argument(2, 'string')->argument(3, 'string', 'null'); //Argument 3 must be a string $query = array('id' => $id, 'name' => $name, 'description' => $description); return $this->_getJsonResponse(self::URL_UPDATE, $query); }
/** * Returns the meta of the last call * * @return array */ public function getMeta($key = NULL) { Eden_Eventbrite_Error::i()->argument(1, 'string', 'null'); if (isset($this->_meta[$key])) { return $this->_meta[$key]; } return $this->_meta; }
/** * Accept PayPal Email * * @param string * @return this */ public function setPaypalEmail($email) { //Argument 1 must be a string Eden_Eventbrite_Error::i()->argument(1, 'string'); $this->_query['paypal_email'] = $email; return $this; }
/** * * * @param int * @return this */ public function setVenue($venue) { //Argument 1 must be a numeric Eden_Eventbrite_Error::i()->argument(1, 'numeric'); $this->_query['venue_id'] = $venue; return $this; }
/** * Creates the discount * * @param int the discount id * @return array */ public function update($id) { //Argument 1 must be int Eden_Eventbrite_Error::i()->argument(1, 'int'); $query = $this->_query; $query['id'] = $id; return $this->_getJsonResponse(self::URL_UPDATE, $query); }
/** * Sets a tranking link * * @param string * @return this */ public function setTracking($tracking) { //Argument 1 must be a string Eden_Eventbrite_Error::i()->argument(1, 'string'); $query['tracking_link'] = $tracking; return $this; }
/** * Returns Eventbrite Venue * * @param string * @param string|null * @return Eden_Eventbrite_Venue */ public function venue($user, $api = NULL) { //argument test Eden_Eventbrite_Error::i()->argument(1, 'string')->argument(2, 'string', 'null'); //Argument 2 must be a string or null return Eden_Eventbrite_Venue::i($user, $api); }
/** * Updates the venue * * @param int * @param string * @return array */ public function update($id, $venue) { //argument test Eden_Eventbrite_Error::i()->argument(1, 'int')->argument(2, 'string'); //Argument must be a string $query = array('id' => $id, 'venue' => $venue); $query = array_merge($query, $this->_query); return $this->getJsonResponse(self::URL_UPDATE, $query); }
/** * Updates the current user * * @param string|null * @param string|null * @return array */ public function update($email = NULL, $pass = NULL) { //argument test Eden_Eventbrite_Error::i()->argument(1, 'string', 'null')->argument(2, 'string', 'null'); //Argument 2 must be a string or null $query = array(); //if email is not empty if (!is_null($email)) { //add it to our query $query['new_email'] = $email; } //if pass is not empty and the string lenght is greater than equal to 4 if (!is_null($pass) && strlen($pass) >= 4) { //add it to our query $query['new_password'] = $pass; } return $this->getJsonResponse(self::URL_UPDATE, $query); }
/** * Updates the ticket * * @return array */ public function update() { if (!isset($this->_query['event_id'])) { Eden_Eventbrite_Error::i()->setMessage(Eden_Eventbrite_Error::EVENT_NOT_SET)->trigger(); } if (!isset($this->_query['name'])) { Eden_Eventbrite_Error::i()->setMessage(Eden_Eventbrite_Error::NAME_NOT_SET)->trigger(); } if (!isset($this->_query['price'])) { Eden_Eventbrite_Error::i()->setMessage(Eden_Eventbrite_Error::PRICE_NOT_SET)->trigger(); } if (!isset($this->_query['quantity'])) { Eden_Eventbrite_Error::i()->setMessage(Eden_Eventbrite_Error::QUANTITY_NOT_SET)->trigger(); } return $this->_getJsonResponse(self::URL_UPDATE, $this->_query); }
/** * Returns any event discounts * * @param number * @return array */ public function getDiscounts($id) { //Argument 1 must be numeric Eden_Eventbrite_Error::i()->argument(1, 'numeric'); $query = array('id' => $id); return $this->_getJsonResponse(self::URL_LIST_DISCOUNTS, $query); }
public function venue($user, $api = NULL) { Eden_Eventbrite_Error::i()->argument(1, 'string')->argument(2, 'string', 'null'); return Eden_Eventbrite_Venue::i($user, $api); }