예제 #1
0
def getOpenId(code):
    constant = BaseConstant()
    url = api_openid % (constant.getAppId(), constant.getAppSecret(), code)
    jsonStr = httpUtil.get(url)
    resultDic = json.loads(jsonStr)
    logging.warn(json.dumps(resultDic, ensure_ascii=False))
    return resultDic
예제 #2
0
def getAccessToken():
    constant = BaseConstant()
    url = api_access_token % (constant.getAppId(), constant.getAppSecret())
    jsonStr = httpUtil.get(url)
    resultDic = json.loads(jsonStr)
    logging.warn(json.dumps(resultDic, ensure_ascii=False))
    return resultDic
예제 #3
0
def getJsapiTicket(accessToken):
    url = api_jsapi_ticket % (accessToken)
    jsonStr = httpUtil.get(url)
    resultDic = json.loads(jsonStr)
    logging.warn(json.dumps(resultDic, ensure_ascii=False))
    return resultDic
예제 #4
0
def deleteMenu():
    url = api_menu_delete % (accessToken)
    jsonStr = httpUtil.get(url)
    resultDic = json.loads(jsonStr)
    logging.warn(json.dumps(resultDic, ensure_ascii=False))
    return resultDic
예제 #5
0
def getCallbackIp():
    url = api_callback_ip % (accessToken)
    jsonStr = httpUtil.get(url)
    resultDic = json.loads(jsonStr)
    logging.warn(json.dumps(resultDic, ensure_ascii=False))
    return resultDic