add serviceProviderApi

This commit is contained in:
abelzhu
2018-02-27 10:52:19 +08:00
committed by GitHub
parent 6162fa0907
commit 23967cbf5b
5 changed files with 84 additions and 7 deletions
+2
View File
@@ -17,6 +17,8 @@ sys.path.append("../src/")
from ServiceCorpApi import *
from TestConf import *
## 第三方服务商接口的使用方法
api = ServiceCorpApi(
"SUITE_ID",
"SUITE_SECRET",
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env python
# -*- coding:utf-8 -*-
##
# Copyright (C) 2018 All rights reserved.
#
# @File ServiceProviderTest.py
# @Brief
# @Author abelzhu, abelzhu@tencent.com
# @Version 1.0
# @Date 2018-02-26
#
#
import sys
sys.path.append("../src/")
from ServiceProviderApi import *
from TestConf import *
api = ServiceProviderApi('CORPID', 'PROVIDER_SECRET')
try :
response = api.httpCall(
SERVICE_PROVIDER_API_TYPE['GET_LOGIN_INFO'],
{
'auth_code' : 'XXXXXXX',
})
print response
except ApiException as e :
print e.errCode, e.errMsg