File tree Expand file tree Collapse file tree
server/projects/main/apps/authen Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212
1313``` json
1414{
15- "Authorization" : " 当前user的token"
15+ "Authorization" : " Token 当前user的token"
1616}
1717```
1818
@@ -37,7 +37,7 @@ import requests
3737# 获取helloworld团队下的hellotca项目下登记的代码库
3838url= " http://tca.com/server/main/api/orgs/helloworld/teams/hellotca/repos/?limit=12&offset=0"
3939headers = {
40- " Authorization" : token,
40+ " Authorization" : " Token %s " % token,
4141}
4242
4343response = requests.get(url, headers = headers)
@@ -115,3 +115,17 @@ print(response.json())
115115平台返回的数据分页格式是使用` limit ` 和` offset ` 参数进行分页处理
116116
117117比如:` server/main/api/orgs/<org_sid>/teams/?limit=12&offset=12 ` 获取得到的数据是从第 13 条开始获取
118+
119+ ## 响应格式
120+
121+ 平台返回的响应格式如下:
122+
123+
124+ ``` JSON
125+ {
126+ "data" : {... }, # 详细数据
127+ "code" : 0 , # 请求结果码,为0表示正常
128+ "msg" : " xxx" , # 请求结果信息
129+ "status_code" : 200 # 请求响应码
130+ }
131+ ```
You can’t perform that action at this time.
0 commit comments