#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time     : 2019/10/8 16:35
# @Author   : sun yan


from common.request import Request
from config import readconfig
import json

def get_task_id(token):

    request=Request()

    method='post'
    param={
         "task_type":201,
         "dst_node":90,
         "target_vehicle":35
}
    para=json.dumps(param)

    url=readconfig.antelope_url+'/tasks/task/'
    header = {"Content-Type": "application/x-www-form-urlencoded", "token": token}
    r=request.request(method,url,para,header)
    result=r.json()

    return result['data']['rows'][0]['id']
72cbc1fe6bd49c1535bbe730dfc2a5b3529331e8
<mask token>

<mask token>


def get_task_id(token):
    request = Request()
    method = 'post'
    param = {'task_type': 201, 'dst_node': 90, 'target_vehicle': 35}
    para = json.dumps(param)
    url = readconfig.antelope_url + '/tasks/task/'
    header = {'Content-Type': 'application/x-www-form-urlencoded', 'token':
        token}
    r = request.request(method, url, para, header)
    result = r.json()
    return result['data']['rows'][0]['id']

from common.request import Request
from config import readconfig
import json


def get_task_id(token):
    request = Request()
    method = 'post'
    param = {'task_type': 201, 'dst_node': 90, 'target_vehicle': 35}
    para = json.dumps(param)
    url = readconfig.antelope_url + '/tasks/task/'
    header = {'Content-Type': 'application/x-www-form-urlencoded', 'token':
        token}
    r = request.request(method, url, para, header)
    result = r.json()
    return result['data']['rows'][0]['id']

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time     : 2019/10/8 16:35
# @Author   : sun yan


from common.request import Request
from config import readconfig
import json

def get_task_id(token):

    request=Request()

    method='post'
    param={
         "task_type":201,
         "dst_node":90,
         "target_vehicle":35
}
    para=json.dumps(param)

    url=readconfig.antelope_url+'/tasks/task/'
    header = {"Content-Type": "application/x-www-form-urlencoded", "token": token}
    r=request.request(method,url,para,header)
    result=r.json()

    return result['data']['rows'][0]['id']