public function addCalendar($calendarID, $options = array())
	{
		if ($this->isAuthenticated())
		{
			$options['id'] = $calendarID;
			$url = 'https://www.googleapis.com/calendar/v3/users/me/calendarList';
			$jdata = $this->query($url, json_encode($options), array('Content-type' => 'application/json'), 'post');

			if ($data = json_decode($jdata->body, true))
			{
				return $data;
			}
			else
			{
				throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`.");
			}
		}
		else
		{
			return false;
		}
	}
public function addCalendar($calendarID, $options = array())
	{
		if ($this->isAuthenticated())
		{
			$options['id'] = $calendarID;
			$url = 'https://www.googleapis.com/calendar/v3/users/me/calendarList';
			$jdata = $this->query($url, json_encode($options), array('Content-type' => 'application/json'), 'post');

			if ($data = json_decode($jdata->body, true))
			{
				return $data;
			}
			else
			{
				throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`.");
			}
		}
		else
		{
			return false;
		}
	}
public function addCalendar ( $ calendarID , $ options = array ( ) ) { if ( $ this -> isAuthenticated ( ) ) { $ options [ 'id' ] = $ calendarID ; $ url = 'https://www.googleapis.com/calendar/v3/users/me/calendarList' ; $ jdata = $ this -> query ( $ url , json_encode ( $ options ) , array ( 'Content-type' => 'application/json' ) , 'post' ) ; if ( $ data = json_decode ( $ jdata -> body , true ) ) { return $ data ; } else { throw new UnexpectedValueException ( "Unexpected data received from Google: `{$jdata->body}`." ) ; } } else { return false ; } }
Method to add a calendar to a user's Google Calendar list

@param   string  $calendarID  New calendar ID
@param   array   $options     New calendar settings

@return  mixed  Data from Google

@since   1.0
@throws  UnexpectedValueException
Method to add a calendar to a user s Google Calendar list