def get_calendar(self, calendar_id=None, calendar_name=None):
if calendar_id and calendar_name:<EOL><INDENT>raise RuntimeError('<STR_LIT>')<EOL><DEDENT>if not calendar_id and not calendar_name:<EOL><INDENT>raise RuntimeError('<STR_LIT>')<EOL><DEDENT>if calendar_id:<EOL><INDENT>url = self.build_url(<EOL>self._endpoints.get('<STR_LIT>').format(id=calendar_id))<EOL>params = None<EOL><DEDENT>else:<EOL><INDENT>url = self.build_url(self._endpoints.get('<STR_LIT>'))<EOL>params = {<EOL>'<STR_LIT>': "<STR_LIT>".format(self._cc('<STR_LIT:name>'), calendar_name),<EOL>'<STR_LIT>': <NUM_LIT:1>}<EOL><DEDENT>response = self.con.get(url, params=params)<EOL>if not response:<EOL><INDENT>return None<EOL><DEDENT>if calendar_id:<EOL><INDENT>data = response.json()<EOL><DEDENT>else:<EOL><INDENT>data = response.json().get('<STR_LIT:value>')<EOL>data = data[<NUM_LIT:0>] if data else None<EOL>if data is None:<EOL><INDENT>return None<EOL><DEDENT><DEDENT>return self.calendar_constructor(parent=self,<EOL>**{self._cloud_data_key: data})<EOL>
Returns a calendar by it's id or name

        :param str calendar_id: the calendar id to be retrieved.
        :param str calendar_name: the calendar name to be retrieved.
        :return: calendar for the given info
        :rtype: Calendar