parameters: (self, name, board_id, startDate=None, endDate=None)
return_statement: return Sprint(self._options, self._session, raw=raw_issue_json)
docstring: Create a new sprint for the ``board_id``.
  
          :param name: name of the sprint
          :param board_id: the board to add the sprint to
docstring_summary: Create a new sprint for the ``board_id``.
docstring_tokens: Create a new sprint for the board_id .
function: def create_sprint(self, name, board_id, startDate=None, endDate=None):
          """Create a new sprint for the ``board_id``.
  
          :param name: name of the sprint
          :param board_id: the board to add the sprint to
          """
          payload = {'name': name}
          if startDate:
              payload["startDate"] = startDate
          if endDate:
              payload["endDate"] = endDate
  
          if self._options['agile_rest_path'] == GreenHopperResource.GREENHOPPER_REST_PATH:
              url = self._get_url('sprint/%s' % board_id, base=self.AGILE_BASE_URL)
              r = self._session.post(url)
              raw_issue_json = json_loads(r)
              """ now r contains something like:
              {
                    "id": 742,
                    "name": "Sprint 89",
                    "state": "FUTURE",
                    "linkedPagesCount": 0,
                    "startDate": "None",
                    "endDate": "None",
                    "completeDate": "None",
                    "remoteLinks": []
              }"""
  
              url = self._get_url(
                  'sprint/%s' % raw_issue_json['id'], base=self.AGILE_BASE_URL)
              r = self._session.put(
                  url, data=json.dumps(payload))
              raw_issue_json = json_loads(r)
          else:
              url = self._get_url('sprint', base=self.AGILE_BASE_URL)
              payload['originBoardId'] = board_id
              r = self._session.post(url, data=json.dumps(payload))
              raw_issue_json = json_loads(r)
  
          return Sprint(self._options, self._session, raw=raw_issue_json)
function_tokens: def create_sprint ( self , name , board_id , startDate = None , endDate = None ) : payload = { 'name' : name } if startDate : payload [ "startDate" ] = startDate if endDate : payload [ "endDate" ] = endDate if self . _options [ 'agile_rest_path' ] == GreenHopperResource . GREENHOPPER_REST_PATH : url = self . _get_url ( 'sprint/%s' % board_id , base = self . AGILE_BASE_URL ) r = self . _session . post ( url ) raw_issue_json = json_loads ( r ) """ now r contains something like:
              {
                    "id": 742,
                    "name": "Sprint 89",
                    "state": "FUTURE",
                    "linkedPagesCount": 0,
                    "startDate": "None",
                    "endDate": "None",
                    "completeDate": "None",
                    "remoteLinks": []
              }""" url = self . _get_url ( 'sprint/%s' % raw_issue_json [ 'id' ] , base = self . AGILE_BASE_URL ) r = self . _session . put ( url , data = json . dumps ( payload ) ) raw_issue_json = json_loads ( r ) else : url = self . _get_url ( 'sprint' , base = self . AGILE_BASE_URL ) payload [ 'originBoardId' ] = board_id r = self . _session . post ( url , data = json . dumps ( payload ) ) raw_issue_json = json_loads ( r ) return Sprint ( self . _options , self . _session , raw = raw_issue_json )