From 818945e3f3505a517837160ae4e0ae83eb4cfe9d Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Sun, 18 Jun 2017 23:35:32 +0800
Subject: [PATCH 001/219] =?UTF-8?q?=E6=9B=B4=E6=96=B0readme?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/README.md b/README.md
index f6b3a4e3a..cc5df19ca 100644
--- a/README.md
+++ b/README.md
@@ -82,8 +82,8 @@ APIJSON是一种JSON传输结构协议。
"http://common.cnblogs.com/images/icon_weibo_24.png"
]
},
- "status":200,
- "message":"success"
+ "code":200,
+ "msg":"success"
}
@@ -125,8 +125,8 @@ APIJSON是一种JSON传输结构协议。
}
}
],
- "status":200,
- "message":"success"
+ "code":200,
+ "msg":"success"
}
@@ -237,8 +237,8 @@ APIJSON是一种JSON传输结构协议。
]
}
],
- "status":200,
- "message":"success"
+ "code":200,
+ "msg":"success"
}
@@ -285,29 +285,29 @@ APIJSON是一种JSON传输结构协议。
###
{
- "[]":{ //请求一个数组
- "page":0, //数组条件
+ "[]":{ //请求一个数组
+ "page":0, //数组条件
"count":2,
- "User":{ //请求一个名为User的对象
- "sex":0, //对象条件
- "@column":"id,name,head" //指定返回字段
- },
- "Moment":{
- "userId@":"/User/id" //缺省依赖路径,从所处容器的父容器路径开始
+ "Moment":{ //请求一个名为Moment的对象
+ "content$":"%a%" //对象条件,搜索content中包含 "a" 的动态
},
- "Comment[]":{ //请求一个名为Comment的数组
+ "User":{
+ "id@":"/Moment/userId", //缺省依赖路径,从所处容器的父容器路径开始
+ "@column":"id,name,head" //指定返回字段
+ },
+ "Comment[]":{ //请求一个名为Comment的数组,并去除Comment包装
"count":2,
"Comment":{
"momentId@":"[]/Moment/id" //完整依赖路径
@@ -154,85 +154,92 @@ APIJSON是一种JSON传输结构协议。
}
-[点击这里测试](http://139.196.140.118:8080/get/{"[]":{"page":0,"count":2,"User":{"sex":0,"@column":"id,name,head"},"Moment":{"userId@":"%252FUser%252Fid"},"Comment[]":{"count":2,"Comment":{"momentId@":"[]%252FMoment%252Fid"}}}})
+[点击这里测试](http://139.196.140.118:8080/get/{"[]":{"page":0,"count":2,"Moment":{"content$":"%2525a%2525"},"User":{"id@":"%252FMoment%252FuserId","@column":"id,name,head"},"Comment[]":{"count":2,"Comment":{"momentId@":"[]%252FMoment%252Fid"}}}})
返回:
{
"[]":[
{
- "User":{
- "id":38710,
- "name":"TommyLemon",
- "head":"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000"
- },
"Moment":{
- "id":235,
- "userId":38710,
+ "id":15,
+ "userId":70793,
"date":1486541171000,
+ "content":"APIJSON is a JSON Transmission Structure Protocol…",
+ "praiseUserIdList":[
+ 82055,
+ 82002,
+ 82001
+ ],
"pictureList":[
- "http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg"
+ "http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000",
+ "http://common.cnblogs.com/images/icon_weibo_24.png"
]
},
+ "User":{
+ "id":70793,
+ "name":"Strong",
+ "head":"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000"
+ },
"Comment[]":[
{
- "Comment":{
- "id":160,
- "toId":0,
- "userId":82001,
- "momentId":235,
- "date":1488434166000,
- "content":"This is a Content...-160"
- }
+ "id":176,
+ "toId":166,
+ "userId":38710,
+ "momentId":15,
+ "date":1490444883000,
+ "content":"thank you"
},
{
- "Comment":{
- "id":163,
- "toId":0,
- "userId":82001,
- "momentId":235,
- "date":1488434166000,
- "content":"This is a Content...-163"
- }
+ "id":1490863469638,
+ "toId":0,
+ "userId":82002,
+ "momentId":15,
+ "date":1490863469000,
+ "content":"Just do it"
}
]
},
{
- "User":{
- "id":70793,
- "name":"Strong",
- "head":"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000"
- },
"Moment":{
- "id":12,
- "userId":70793,
- "date":1486541171000,
- "content":1111534034,
+ "id":58,
+ "userId":90814,
+ "date":1485947671000,
+ "content":"This is a Content...-435",
+ "praiseUserIdList":[
+ 38710,
+ 82003,
+ 82005,
+ 93793,
+ 82006,
+ 82044,
+ 82001
+ ],
"pictureList":[
- "http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg",
- "http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg"
+ "http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg"
]
},
+ "User":{
+ "id":90814,
+ "name":7,
+ "head":"http://static.oschina.net/uploads/user/51/102723_50.jpg?t=1449212504000"
+ },
"Comment[]":[
{
- "Comment":{
- "id":162,
- "toId":0,
- "userId":93793,
- "momentId":12,
- "date":1488776625000,
- "content":"This is a Content...-162"
- }
+ "id":13,
+ "toId":0,
+ "userId":82005,
+ "momentId":58,
+ "date":1485948050000,
+ "content":"This is a Content...-13"
},
{
- "Comment":{
- "id":164,
- "toId":0,
- "userId":93793,
- "momentId":12,
- "date":1488776625000,
- "content":"This is a Content...-164"
- }
+ "id":77,
+ "toId":13,
+ "userId":93793,
+ "momentId":58,
+ "date":1485948050000,
+ "content":"This is a Content...-77"
}
]
}
From 0d715925a9a9c168f9b64358780c96cfad526423 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Mon, 19 Jun 2017 01:08:27 +0800
Subject: [PATCH 003/219] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 08e673612..792ce0f96 100644
--- a/README.md
+++ b/README.md
@@ -138,7 +138,7 @@ APIJSON是一种JSON传输结构协议。
"page":0, //数组条件
"count":2,
"Moment":{ //请求一个名为Moment的对象
- "content$":"%a%" //对象条件,搜索content中包含 "a" 的动态
+ "content$":"%a%" //对象条件,搜索content中包含a的动态
},
"User":{
"id@":"/Moment/userId", //缺省依赖路径,从所处容器的父容器路径开始
From 4f76e6d96112b8f3807a7859203ddbfd7123a206 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Mon, 19 Jun 2017 01:48:36 +0800
Subject: [PATCH 004/219] =?UTF-8?q?complex=E8=AF=B7=E6=B1=82=E6=94=B9?=
=?UTF-8?q?=E4=B8=BA=E5=92=8Creadme=E4=B8=80=E8=87=B4=EF=BC=9B=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E6=B3=A8=E9=87=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
APIJSON-JavaScript/access_permitted.html | 1 +
APIJSON-JavaScript/get/array.html | 4 ++--
APIJSON-JavaScript/get/complex.html | 27 +++++++++++-------------
APIJSON-JavaScript/put.html | 2 +-
4 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/APIJSON-JavaScript/access_permitted.html b/APIJSON-JavaScript/access_permitted.html
index 442222834..dc7f3d9dd 100644
--- a/APIJSON-JavaScript/access_permitted.html
+++ b/APIJSON-JavaScript/access_permitted.html
@@ -12,6 +12,7 @@
"Wallet":{
"userId":38710
},
+ //以下都不需要了,新版APIJSON已用session做了自动化登录验证及自动化角色权限管理
"currentUserId":38710,
"loginPassword":"apijson"
};
diff --git a/APIJSON-JavaScript/get/array.html b/APIJSON-JavaScript/get/array.html
index f74da1226..f85c03ba0 100644
--- a/APIJSON-JavaScript/get/array.html
+++ b/APIJSON-JavaScript/get/array.html
@@ -8,7 +8,7 @@
+ APIJSON Test
+
+
+
+
+ APIJSON Test
+
+
+
+
+
+
+
+
+
+
+
+