def new_calendar(self, calendar_name):
        """ Creates a new calendar

        :param str calendar_name: name of the new calendar
        :return: a new Calendar instance
        :rtype: Calendar
        """
        if not calendar_name:
            return None

        url = self.build_url(self._endpoints.get('root_calendars'))

        response = self.con.post(url, data={self._cc('name'): calendar_name})
        if not response:
            return None

        data = response.json()

        # Everything received from cloud must be passed as self._cloud_data_key
        return self.calendar_constructor(parent=self,
                                         **{self._cloud_data_key: data})
def new_calendar ( self , calendar_name ) : if not calendar_name : return None url = self . build_url ( self . _endpoints . get ( 'root_calendars' ) ) response = self . con . post ( url , data = { self . _cc ( 'name' ) : calendar_name } ) if not response : return None data = response . json ( ) return self . calendar_constructor ( parent = self , ** { self . _cloud_data_key : data } )
Creates a new calendar

        :param str calendar_name: name of the new calendar
        :return: a new Calendar instance
        :rtype: Calendar