def _post_deal_note(self, deal_id, note_content='', note_id=None):

        url_base_template = 'deals/%s/notes' % str(deal_id)
        if note_id != None:
            url_base_template += '/%s' % str(note_id)
        url_base_template += self.format

        url = self.base_url + url_base_template

        params = urllib.urlencode({'note[content]': unicode(note_content).encode('utf-8')})

        req = urllib2.Request(url, data=params, headers=self.header)
        if note_id != None:
            req.get_method = lambda: 'PUT'
        response = urllib2.urlopen(req)
        data = response.read()

        return data

    ##########################
    # Contact Functions
    ##########################
PRIVATE FUNCTION
dataset/ETHPy150Open npinger/base-crm-api-client/base_client.py/BaseAPIService._post_deal_note