-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from chhsiao1981/apidoc-3
adding board-users, title, name, desc, limit in apidoc
- Loading branch information
Showing
37 changed files
with
251 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,8 +29,8 @@ type GetUserInfoResult struct { | |
Numposts int `json:"posts"` | ||
Firstlogin types.Time8 `json:"first_login"` | ||
Lastlogin types.Time8 `json:"last_login"` | ||
Lasthost string `json:"last_ip"` | ||
Country string `json:"country"` | ||
LastIP string `json:"last_ip"` | ||
LastHost string `json:"last_host"` //ip 的中文呈現, 外國則為國家. | ||
|
||
Money int `json:"money"` | ||
Email string `json:"email"` | ||
|
@@ -95,7 +95,7 @@ func GetUserInfo(remoteAddr string, userID bbs.UUserID, params interface{}, path | |
Numposts: 123124, | ||
Firstlogin: types.Time8(1234567890), | ||
Lastlogin: types.Time8(1800000000), | ||
Lasthost: "127.0.0.1", | ||
LastIP: "127.0.0.1", | ||
Money: 2114567890, | ||
|
||
Email: "[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
moderators: | ||
type: array | ||
items: | ||
'$ref': '#/definitions/UID' | ||
'$ref': '#/definitions/user_id' | ||
reason: | ||
type: string | ||
description: 不給看的原因. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,3 @@ CommentList: | |
'$ref': '#/definitions/Comment' | ||
nextIdx: | ||
'$ref': '#/definitions/RespNextIdx' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ParamsDesc: | ||
name: 'desc' | ||
in: 'query' | ||
required: false | ||
description: "descending or ascending" | ||
type: boolean | ||
default: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
user_id: | ||
type: string | ||
description: username | ||
description: user_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
'$ref': '#/definitions/user_id' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
UserList: | ||
type: object | ||
properties: | ||
list: | ||
type: array | ||
items: | ||
'$ref': '#/definitions/UserListSummary' | ||
nextIdx: | ||
'$ref': '#/definitions/RespNextIdx' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
UserListSummary: | ||
type: object | ||
properties: | ||
!include uid_core.yaml | ||
!include username_core.yaml | ||
!include nickname_core.yaml | ||
!include user_list_summary_core.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
last_ip: | ||
type: string | ||
description: from-ip | ||
last_host: | ||
type: string | ||
description: last_ip 的網域. | ||
last_action: | ||
type: string | ||
last_action_time: | ||
type: number | ||
pager: | ||
type: number | ||
description: https://github.com/Ptt-official-app/go-pttbbs/blob/main/ptttype/modes.go#L5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
UserSummary: | ||
type: object | ||
properties: | ||
!include uid_core.yaml | ||
!include username_core.yaml | ||
!include nickname_core.yaml | ||
!include user_summary_core.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
login_days: | ||
type: number | ||
post: | ||
type: number | ||
last_action: | ||
type: string | ||
last_action_time: | ||
type: number | ||
last_login: | ||
type: number | ||
description: last-login in unix-time | ||
badpost: | ||
type: number | ||
description: badpost count | ||
money: | ||
type: number | ||
|
||
five_win: | ||
type: number | ||
description: 五子棋(贏) | ||
five_lose: | ||
type: number | ||
description: 五子棋(輸) | ||
five_tie: | ||
type: number | ||
description: 五子棋(平) | ||
chc_win: | ||
type: number | ||
description: 象棋(贏) | ||
chc_lose: | ||
type: number | ||
description: 象棋(輸) | ||
chc_tie: | ||
type: number | ||
description: 象棋(平) | ||
conn6_win: | ||
type: number | ||
description: 六子棋(贏) | ||
conn6_lose: | ||
type: number | ||
description: 六子棋(輸) | ||
conn6_tie: | ||
type: number | ||
description: 六子棋(平) | ||
go_win: | ||
type: number | ||
description: 圍棋(贏) | ||
go_lose: | ||
type: number | ||
description: 圍棋(輸) | ||
go_tie: | ||
type: number | ||
description: 圍棋(平) | ||
dark_win: | ||
type: number | ||
description: 暗棋(贏) | ||
dark_lose: | ||
type: number | ||
description: 暗棋(輸) | ||
dark_tie: | ||
type: number | ||
description: 暗棋(平) | ||
chess_rank: | ||
type: number | ||
description: 象棋等級 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
username: | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
GetUserInfo | ||
拿到本人的所有資訊. | ||
--- | ||
tags: | ||
- user | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
拿到 user 的 summary 資訊. | ||
--- | ||
tags: | ||
- user | ||
definitions: | ||
parameters: | ||
- name: 'user_id' | ||
in: 'path' | ||
required: true | ||
type: string | ||
- '$ref': '#/definitions/ParamsFields' | ||
responses: | ||
200: | ||
description: | ||
schema: | ||
'$id': https://json-schema.org/draft/2019-09/output/schema | ||
'$ref': '#/definitions/UserSummary' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
讀取板的上線板友名單 | ||
--- | ||
tags: | ||
- board | ||
- user | ||
description: 讀取板的上線板友名單 | ||
parameters: | ||
- '$ref': '#/definitions/ParamsAuthorization' | ||
- name: 'bid' | ||
in: 'path' | ||
required: true | ||
description: "board bid obtained from board-list" | ||
type: string | ||
- name: 'name' | ||
in: 'query' | ||
required: false | ||
description: "query string, '' returns all users" | ||
type: string | ||
default: '' | ||
- '$ref': '#/definitions/ParamsStartIdx' | ||
- '$ref': '#/definitions/ParamsLimit' | ||
- '$ref': '#/definitions/ParamsDesc' | ||
responses: | ||
200: | ||
description: | ||
schema: | ||
'$id': https://json-schema.org/draft/2019-09/output/schema | ||
'$ref': '#/definitions/UserList' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.