当前位置: 首页>>代码示例>>Python>>正文


Python HttpCall.callHttpGET方法代码示例

本文整理汇总了Python中HttpCall.callHttpGET方法的典型用法代码示例。如果您正苦于以下问题:Python HttpCall.callHttpGET方法的具体用法?Python HttpCall.callHttpGET怎么用?Python HttpCall.callHttpGET使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HttpCall的用法示例。


在下文中一共展示了HttpCall.callHttpGET方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: accountCases

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpGET [as 别名]
def accountCases(account):
    retrieveData = {"ruleSet": "ECBase"}
    res = HttpCall.callHttpGET(
        uri, service + "/" + retrieveData["ruleSet"] + "/case", {
            "account": account
        }).strip()
    return res
开发者ID:revolutionarysystems,项目名称:oddball-test,代码行数:9,代码来源:testOddball-ec.py

示例2: binCases

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpGET [as 别名]
def binCases(account, bin, transformer=None):
    retrieveData = {"ruleSet":"ECBase","bin":bin}
    params = {"account":account}
    if transformer !=None:
        params["transformer"]=transformer
    res = HttpCall.callHttpGET(uri, service+"/"+retrieveData["ruleSet"]+"/bin/"+retrieveData["bin"],params).strip()
    return res
开发者ID:revolutionarysystems,项目名称:oddball-test,代码行数:9,代码来源:testOddball-ec.py

示例3: latestUserCase

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpGET [as 别名]
def latestUserCase(account, user, transformer=None):
    retrieveData = {"ruleSet":"ECBase", "userId":user}
    params = {"account":account}
    if transformer !=None:
        params["transformer"]=transformer
    res = HttpCall.callHttpGET(uri, service+"/"+retrieveData["ruleSet"]+"/userId/"+retrieveData["userId"]+"/latest", params).strip()
    return "["+res+"]"
开发者ID:revolutionarysystems,项目名称:oddball-test,代码行数:9,代码来源:testOddball-ec.py

示例4: users

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpGET [as 别名]
def users(account, recent=None):
    retrieveData = {"ruleSet":"ECBase"}
    params = {"account":account}
    if recent!=None:
        params["recent"]=recent
    res = HttpCall.callHttpGET(uri, service+"/"+retrieveData["ruleSet"]+"/userId/", params).strip()
    return res
开发者ID:revolutionarysystems,项目名称:oddball-test,代码行数:9,代码来源:testOddball-ec.py

示例5: latestSessionCase

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpGET [as 别名]
def latestSessionCase(account, session, transformer=None):
    params = {"account":account}
    if transformer !=None:
        params["transformer"]=transformer
    retrieveData = {"ruleSet":"ECBase", "sessionId":session}
    res = HttpCall.callHttpGET(uri, service+"/"+retrieveData["ruleSet"]+"/sessionId/"+retrieveData["sessionId"]+"/latest", params).strip()
    return "["+res+"]"
开发者ID:revolutionarysystems,项目名称:oddball-test,代码行数:9,代码来源:testOddball-ec.py

示例6: sessionCases

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpGET [as 别名]
def sessionCases(account, session):
    retrieveData = {"ruleSet": "ECBase", "sessionId": session}
    res = HttpCall.callHttpGET(
        uri, service + "/" + retrieveData["ruleSet"] + "/sessionId/" +
        retrieveData["sessionId"], {
            "account": account
        }).strip()
    return res
开发者ID:revolutionarysystems,项目名称:oddball-test,代码行数:10,代码来源:testOddball-ec.py

示例7: query2

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpGET [as 别名]
def query2(account):
    retrieveData = {
        "ruleSet": "ECBase",
        "query": '{ "tags": "WinXX", "case.userId" : "mikeytest"}'
    }
    res = HttpCall.callHttpGET(
        uri, service + "/" + retrieveData["ruleSet"] + "/query/", {
            "query": retrieveData["query"],
            "account": account
        }).strip()
    return res
开发者ID:revolutionarysystems,项目名称:oddball-test,代码行数:13,代码来源:testOddball-ec.py

示例8: query1

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpGET [as 别名]
def query1(account):
    retrieveData = {
        "ruleSet": "ECBase",
        "query": '{ "case.browser": "firefox" }'
    }
    res = HttpCall.callHttpGET(
        uri, service + "/" + retrieveData["ruleSet"] + "/query/", {
            "query": retrieveData["query"],
            "account": account
        }).strip()
    return res
开发者ID:revolutionarysystems,项目名称:oddball-test,代码行数:13,代码来源:testOddball-ec.py

示例9: queryPlatform

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpGET [as 别名]
def queryPlatform(account, platform):
    retrieveData = {
        "ruleSet": "ECBase",
        "query": '{ "case.device.platform": ' + platform + ' }'
    }
    res = HttpCall.callHttpGET(
        uri, service + "/" + retrieveData["ruleSet"] + "/query/", {
            "query": retrieveData["query"],
            "account": account
        }).strip()
    return res
开发者ID:revolutionarysystems,项目名称:oddball-test,代码行数:13,代码来源:testOddball-ec.py

示例10: queryRecent

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpGET [as 别名]
def queryRecent(account, mins):
    mins_ago = Date().getTime() - mins * 60 * 1000
    retrieveData = {
        "ruleSet": "ECBase",
        "query": '{ "timeStamp": { "$gt": "' + str(mins_ago) + '"} }'
    }
    print retrieveData["query"]
    res = HttpCall.callHttpGET(
        uri, service + "/" + retrieveData["ruleSet"] + "/query/", {
            "query": retrieveData["query"],
            "account": account
        }).strip()
    return res
开发者ID:revolutionarysystems,项目名称:oddball-test,代码行数:15,代码来源:testOddball-ec.py

示例11: query3

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpGET [as 别名]
def query3(account):
    mins_ago = Date().getTime() - 18 * 60 * 1000
    retrieveData = {
        "ruleSet":
        "ECBase",
        "query":
        '{ "tags": "WinXX", "case.userId" : "mikeytest", "timeStamp": { "$gt": "'
        + str(mins_ago) + '"} }'
    }
    res = HttpCall.callHttpGET(
        uri, service + "/" + retrieveData["ruleSet"] + "/query/", {
            "query": retrieveData["query"],
            "account": account
        }).strip()
    return res
开发者ID:revolutionarysystems,项目名称:oddball-test,代码行数:17,代码来源:testOddball-ec.py

示例12: binCases

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpGET [as 别名]
def binCases(account, bin):
    retrieveData = {"ruleSet":"ECBase","bin":bin}
    res = HttpCall.callHttpGET(uri, service+"/"+retrieveData["ruleSet"]+"/bin/"+retrieveData["bin"],{"account":account}).strip()
    return res
开发者ID:revolutionarysystems,项目名称:oddball-test,代码行数:6,代码来源:testOddball-json.py

示例13: Date

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpGET [as 别名]
subscriptions = ["eCK-1000", "eCK-1001", "eCK-1002", "eCK-1003", "eCK-1004", "eCK-1005"]
sampleData = [
        '{ "case":"1000"  }',
        '{ "browser":"chrome", "platform":"Win", "sessionId": "{sessionId}", "userId": "{userId}", "accountId": "{accountId}"  }',
        '{ "browser":"firefox", "platform":"Win32", "sessionId": "{sessionId}", "userId": "{userId}", "accountId": "{accountId}"       }',
        '{ "browser":"safari", "platform":"ios", "sessionId": "{sessionId}", "userId": "{userId}", "accountId": "{accountId}"       }',
        '{ "browser":"safari", "platform":"Android", "sessionId": "{sessionId}", "userId": "{userId}", "accountId": "{accountId}"       }',
        '{ "browser":"safari", "platform":"MacOS", "sessionId": "{sessionId}", "userId": "{userId}", "accountId": "{accountId}"       }',
        '{ "browser":"chrome", "platform":"Win32", "screen": {"availWidth": 1600}, "sessionId": "{sessionId}", "userId": "{userId}", "accountId": "{accountId}"       }',
        '{ "browser":"chrome", "platform":"Win32", "screen": {"availWidth": 550}, "sessionId": "{sessionId}", "userId": "{userId}", "accountId": "{accountId}"       }',
        '{ "browser":"chrome", "platform":"Win64", "availWidth": 550, "sessionId": "{sessionId}", "userId": "{userId}", "accountId": "{accountId}"     }',
        '{ "browser":"chrome", "platform":"Win64", "screen": {"availWidth": 500}, "sessionId": "{sessionId}", "userId": "{userId}", "accountId": "{accountId}"       }',
        ]

clearData = {"ruleSet":"ECBase", "action":"clear"}
HttpCall.callHttpGET(uri, service+"/"+clearData["ruleSet"], clearData).strip()

retrieveData = {"ruleSet":"ECBase"}
fullUri = uri+service+"/"+retrieveData["ruleSet"]+"/bin/reload"
print fullUri
res = HttpCall.callHttpGET(uri, service+"/"+retrieveData["ruleSet"]+"/bin/reload",{}).strip()
print res

print


print Date()
for i in range(1):
    for case in sampleData:
        data = {"ruleSet":"ECBase", "case":case.replace('{sessionId}', sessions[8 * i%len(sessions)]).replace('{userId}', users[i%len(users)]).replace('{accountId}', subscriptions[i%len(subscriptions)])}
        res=HttpCall.callHttpGET(uri, service+"/"+data["ruleSet"], data).strip()
开发者ID:revolutionarysystems,项目名称:oddball-test,代码行数:33,代码来源:testOddball-json.py

示例14: getInstance

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpGET [as 别名]
def getInstance(instanceType, id): 
    response = HttpCall.callHttpGET(server, "objectology/"+instanceType+"/"+id, {}).strip()
    return response
开发者ID:revolutionarysystems,项目名称:common-test,代码行数:5,代码来源:o_utils.py

示例15: getInstanceByProperty

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpGET [as 别名]
def getInstanceByProperty(instanceType, propertyName, value): 
    response = HttpCall.callHttpGET(server, "objectology/"+instanceType+"/query", {propertyName: value}).strip()
    return response
开发者ID:revolutionarysystems,项目名称:common-test,代码行数:5,代码来源:o_utils.py


注:本文中的HttpCall.callHttpGET方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。