Skip to content

Commit

Permalink
docs: update doc for Blocklet SDK (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
linchen1987 authored Jun 27, 2022
1 parent 8d79e4e commit 6180f6b
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 10 deletions.
3 changes: 1 addition & 2 deletions .makefiles/bump_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ if [ -f $VERSION ]; then
V_PATCH=${BASE_LIST[2]}
echo -e "${NOTICE_FLAG} Current version: ${WHITE}$BASE_STRING"
echo -e "${NOTICE_FLAG} Latest commit hash: ${WHITE}$LATEST_HASH"
V_MINOR=$((V_MINOR + 1))
V_PATCH=0
V_PATCH=$((V_PATCH + 1))
SUGGESTED_VERSION="$V_MAJOR.$V_MINOR.$V_PATCH"
echo -ne "${QUESTION_FLAG} ${CYAN}Enter a version number [${WHITE}$SUGGESTED_VERSION${CYAN}]: "
read INPUT_STRING
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.6.3 (June 27, 2022)

- docs: update doc for Blocklet SDK

## 0.6.2 (April 28, 2022)

- doc: update sdk doc
Expand Down
6 changes: 4 additions & 2 deletions blocklet.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: '@arcblock/abtnode-docs'
version: 0.6.2
version: 0.6.3
description: >-
Blocklet Server Documentation, a help documentation for quickly get started
with Blocklet Server.
Expand All @@ -8,9 +8,11 @@ files:
- public/
- screenshots/
- blocklet.md
- logo.png
keywords:
- Docs
- ABTNode
logo: logo.png
repository:
type: git
url: git+https://github.com/ArcBlock/abtnode-docs.git
Expand All @@ -25,7 +27,7 @@ title: Blocklet Server Docs
community: https://gitter.im/ArcBlock/community
documentation: https://docs.arcblock.io
support: [email protected]
specVersion: 1.2.4
specVersion: 1.2.7
did: z8ia5NLSuFwhPimBJHRdPmp6yx9fG8rcFex4b
timeout:
start: 10
Expand Down
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@arcblock/abtnode-docs",
"version": "0.6.2",
"version": "0.6.3",
"description": "Blocklet Server Documentation, a help documentation for quickly get started with Blocklet Server.",
"main": "index.js",
"publishConfig": {
Expand Down
26 changes: 24 additions & 2 deletions src/developer/blocklet-sdk/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,31 @@ Get owner of the team

#### client.getUsers()

Get all users of the team
Get users of the app

- _@param_ **paging** `Object`
- **paging.pageSize** ``
- **paging.page** ``
- _@param_ **query** `Object`
- **query.role** `String` Match users by role name
- `$none`: Match users which does not have a role
- **query.approved** `Boolean` Match users by approved
- **query.search** `String` Match users by did or fullName
- _@param_ **sort** `Object`
- **sort.createdAt** `Number`
- **sort.updatedAt** `Number`
- **sort.lastLoginAt** `Number`
- > `-1`: The latest time is at first. `1`: The latest time is at last.
- _@return_ `{ code, users, paging }`

- _@return_ `{ code, users }`
```
Paging {
total: number of users
pageSize: number of users per page
pageCount: number of page
page: current page number
}
```

#### client.getPermissionsByRole(role)

Expand Down
26 changes: 24 additions & 2 deletions src/developer/blocklet-sdk/index.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,31 @@ Get owner of the team

#### client.getUsers()

Get all users of the team
获取用户列表

- _@param_ **paging** `Object`
- **paging.pageSize** ``
- **paging.page** ``
- _@param_ **query** `Object`
- **query.role** `String` 按 role name 匹配
- `$none`: 匹配没有 role 的用户
- **query.approved** `Boolean` 按 approved 匹配
- **query.search** `String` 按 did 或 fullName 匹配
- _@param_ **sort** `Object`
- **sort.createdAt** `Number`
- **sort.updatedAt** `Number`
- **sort.lastLoginAt** `Number`
- > `-1`: The latest time is at first. `1`: The latest time is at last.
- _@return_ `{ code, users, paging }`

- _@return_ `{ code, users }`
```
Paging {
total: 全部用户数量
pageSize: 每页用户数量
pageCount: 一共有几页
page: 当前是第几页
}
```

#### client.getPermissionsByRole(role)

Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.2
0.6.3

0 comments on commit 6180f6b

Please sign in to comment.