Update documentation_eng.md

This commit is contained in:
TommyLemon 2019-09-15 01:35:32 +08:00 committed by GitHub
parent 7440fa73e0
commit fdf44e8e08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@
 Methods | URL | Request | Response
------------ | ------------ | ------------ | ------------
**GET**: <br /> A general way to get data.<br /> You can use dev tools to make edits in a web browser. | base_url/get/ | {<br /> &nbsp;&nbsp; TableName:{<br /> &nbsp;&nbsp;&nbsp;&nbsp; //Add contiditions here.<br /> &nbsp;&nbsp; }<br />} <br /> <br /> Eg. To get a Moment with `id = 235`<br />{<br /> &nbsp;&nbsp; "Post":{<br /> &nbsp;&nbsp;&nbsp;&nbsp; "id":235<br /> &nbsp;&nbsp; }<br />} | {<br /> &nbsp;&nbsp; TableName:{<br /> &nbsp;&nbsp;&nbsp;&nbsp; ...<br /> &nbsp;&nbsp; },<br /> &nbsp;&nbsp; "code":200,<br /> &nbsp;&nbsp; "msg":"success"<br />}<br />Eg.<br />{<br /> &nbsp;&nbsp; "Moment":{<br /> &nbsp;&nbsp;&nbsp;&nbsp; "id":235,<br /> &nbsp;&nbsp;&nbsp;&nbsp; "userId":38710,<br /> &nbsp;&nbsp;&nbsp;&nbsp; "content":"APIJSON,let interfaces and documents go to hell !"<br /> &nbsp;&nbsp; },<br /> &nbsp;&nbsp; "code":200,<br /> &nbsp;&nbsp; "msg":"success"<br /> }
**GET**: <br /> A general way to get data.<br /> You can use dev tools to make edits in a web browser. | base_url/get/ | {<br /> &nbsp;&nbsp; TableName:{<br /> &nbsp;&nbsp;&nbsp;&nbsp; //Add contiditions here.<br /> &nbsp;&nbsp; }<br />} <br /> <br /> Eg. To get a Moment with `id = 235`<br />{<br /> &nbsp;&nbsp; "Moment":{<br /> &nbsp;&nbsp;&nbsp;&nbsp; "id":235<br /> &nbsp;&nbsp; }<br />} | {<br /> &nbsp;&nbsp; TableName:{<br /> &nbsp;&nbsp;&nbsp;&nbsp; ...<br /> &nbsp;&nbsp; },<br /> &nbsp;&nbsp; "code":200,<br /> &nbsp;&nbsp; "msg":"success"<br />}<br />Eg.<br />{<br /> &nbsp;&nbsp; "Moment":{<br /> &nbsp;&nbsp;&nbsp;&nbsp; "id":235,<br /> &nbsp;&nbsp;&nbsp;&nbsp; "userId":38710,<br /> &nbsp;&nbsp;&nbsp;&nbsp; "content":"APIJSON,let interfaces and documents go to hell !"<br /> &nbsp;&nbsp; },<br /> &nbsp;&nbsp; "code":200,<br /> &nbsp;&nbsp; "msg":"success"<br /> }
**HEAD**: <br /> A general way to get counts.<br /> You can use dev tools to make edits in a web browser. | base_url/head/ | {<br /> &nbsp;&nbsp; TableName:{<br /> &nbsp;&nbsp;&nbsp;&nbsp;<br /> &nbsp;&nbsp; }<br /> } <br /> {…} are conditions. <br /><br /> Eg. Get the number of Moments posted by the user with `id = 38710`<br />{<br /> &nbsp;&nbsp; "Moment":{<br /> &nbsp;&nbsp;&nbsp;&nbsp; "userId":38710<br /> &nbsp;&nbsp; }<br />} | {<br /> &nbsp;&nbsp; TableName:{<br /> &nbsp;&nbsp;&nbsp;&nbsp; "code":200,<br /> &nbsp;&nbsp;&nbsp;&nbsp; "msg":"success",<br /> &nbsp;&nbsp;&nbsp;&nbsp; "count":10<br /> &nbsp;&nbsp; },<br /> &nbsp;&nbsp; "code":200,<br /> &nbsp;&nbsp; "msg":"success"<br />} <br /> Eg.<br />{<br /> &nbsp;&nbsp; "Moment":{<br /> &nbsp;&nbsp;&nbsp;&nbsp; "code":200,<br /> &nbsp;&nbsp;&nbsp;&nbsp; "msg":"success",<br /> &nbsp;&nbsp;&nbsp;&nbsp; "count":10<br /> &nbsp;&nbsp; },<br /> &nbsp;&nbsp; "code":200,<br /> &nbsp;&nbsp; "msg":"success"<br />}
**GETS**: <br /> Get data with high security and confidentiality.<br /> Eg. bank accounts, birth date. | base_url/gets/ | You need to add ` "tag": tag` with the same level of `Moment:{}`. Others are the same as **GET**. | Same as **GET**.
**HEADS**: <br /> Get counts of confidential data(eg. bank account).| base_url/heads/ | You need to add `"tag": tag` with the same level of `Moment:{}`. Others are the same as **HEAD**. | Same as **HEAD**.