示例#1
0
文件: task.py 项目: baozitou/ones-api
def tasks_add2(json):
    resp = team_api.post("/team/{team_uuid}/tasks/add2",
                         "project",
                         "project",
                         json=json)
    logger.debug("response: {}".format(resp))
    return resp
示例#2
0
def copy_project(json):
    resp = team_api.post('/team/{team_uuid}/projects/copy',
                         "project",
                         "project",
                         json=json)
    logger.debug('response: {}'.format(resp))
    return resp
示例#3
0
def add_caselibrary_api(json):
    resp = team_api.post("/team/{team_uuid}/testcase/libraries/add",
                         "project",
                         "project",
                         json=json)
    logger.debug("response: {}".format(resp))
    return resp
示例#4
0
def add_project(json):
    response = team_api.post('/team/{team_uuid}/projects/add',
                             "project",
                             "project",
                             json=json)
    logger.debug('response: {}'.format(response))
    return response
示例#5
0
def add_testcase_api(json):
    resp = team_api.post("/team/{team_uuid}/items/add",
                         "project",
                         "project",
                         json=json)
    logger.debug("response: {}".format(resp))
    return resp
示例#6
0
def add_testplan_api(json):
    resp = team_api.post("/team/{team_uuid}/testcase/plans/add",
                         "project",
                         "project",
                         json=json)
    logger.debug('response: {}'.format(resp))
    return resp
示例#7
0
def plan_add(json):
    url = "/team/{team_uuid}/items/add"
    resp = team_api.post(url, "project", "project", json=json)
    logger.debug('response: {}'.format(resp))
    return resp


# http://54.223.93.94/project/api/project/team/DnXpawSp/items/add
示例#8
0
 def stamps_data(self, dic_stamp):
     ''''
     dic_stamp:传stamp里需要返回的字典值
     例如:
         {"transition": 1500000000000000}
     '''
     response = team_api.post(
         '/team/{team_uuid}/stamps/data', "project","project", json=_stamp_json(dic_stamp))
     logger.debug('Stamp stamps_data response: {}'.format(response))
     return response
示例#9
0
 def peek(self, peek_json):
     '''
     Args:
         peek_json:peek接口特定的json
     '''
     response = team_api.post('/team/{team_uuid}/filters/peek',
                              "project",
                              "project",
                              json=peek_json)
     logger.debug('response: {}'.format(response))
     return response
示例#10
0
 def get_pending_member(self):
     '''
     获取等待激活的用户
     '''
     response = team_api.post('/team/{team_uuid}/stamps/data',
                              'project',
                              "project",
                              json={
                                  "evaluated_permission": 0,
                                  "team": 0,
                                  "team_member": 0
                              })
     logger.debug('response: {}'.format(response))
     return response["team_member"]["pending_members"]
示例#11
0
 def add_batch(self, json):
     '''
     批量发送邀请邮箱
     Args:
         json:{
             "email":[
                 "*****@*****.**",
                 "*****@*****.**"
             ]
         }
     '''
     response = team_api.post('/team/{team_uuid}/invitations/add_batch',
                              'project',
                              "project",
                              json=json)
     logger.debug('response: {}'.format(response))
     return response
示例#12
0
文件: task.py 项目: baozitou/ones-api
def tasks_add(json):
    resp = team_api.post('/team/{team_uuid}/tasks/add', "project", json=json)
    logger.debug('response: {}'.format(resp))
    return resp
示例#13
0
def space_add(json):
    url = "/team/{team_uuid}/spaces/add"
    resp = team_api.post(url, "wiki", "wiki", json=json)
    logger.debug('response: {}'.format(resp))
    return resp
示例#14
0
文件: page.py 项目: baozitou/ones-api
def page_update(json, space_uuid, add_uuid):
    url = "/team/{team_uuid}" + "/space/{}/draft/{}/update".format(
        space_uuid, add_uuid)
    resp = team_api.post(url, "wiki", "wiki", json=json)
    logger.debug("response: {}".format(resp))
    return resp
示例#15
0
文件: page.py 项目: baozitou/ones-api
def page_add(json, space_uuid):
    url = "/team/{team_uuid}" + "/space/{}/drafts/add".format(space_uuid)
    resp = team_api.post(url, "wiki", "wiki", json=json)
    logger.debug('response: {}'.format(resp))
    return resp