( , rep)
jtb . , , ( )
def set_description(build_url, desc, user, token):
import base64, urllib, urllib2
req_data = urllib.urlencode( {'description': desc } )
req = urllib2.Request(build_url + '/submitDescription', req_data)
req.add_header('Content-Type', 'application/x-www-form-urlencoded')
auth = 'Basic {}'.format(base64.b64encode("{}:{}".format( user, token )))
req.add_header( 'Authorization', auth )
response = urllib2.urlopen(req)
API Token : http://<myserver>/me/configure