Exemplo n.º 1
0
def buildSite(body):
    """创建站点"""
    payload = url_util.urlencode(body)
    s = Setting(request="POST", headers=HEADERS)
    res = Downloader.payload(MAIN_URL, data=payload, setting=s)
    print(res.json())
    return res.json()["data"]["id"]
Exemplo n.º 2
0
def testTp(body):
    payload = url_util.urlencode(body)
    s = Setting(request="POST", headers=HEADERS)
    res = Downloader.payload(TEST_TEMPLATE_URL, data=payload, setting=s)
    return res.json()["data"]
Exemplo n.º 3
0
def buildTask(body):
    payload = url_util.urlencode(body)
    s = Setting(request="POST", headers=HEADERS)
    res = Downloader.payload(BUILD_TASK_URL, data=payload, setting=s)
    print(res.json())
    return res.json()["data"]["id"]
Exemplo n.º 4
0
def buildTemplate(body):
    """创建模板"""
    payload = url_util.urlencode(body)
    s = Setting(request="POST", headers=HEADERS)
    res = Downloader.payload(BUILD_TEMPLATE_URL, data=payload, setting=s)
    return res.json()["data"]["id"]