feat: add offset param to GetRecentBlocks

This commit is contained in:
Nex Zhu 2021-09-09 09:08:49 +08:00
parent 0d8ac0a76d
commit 94743e9a17
No known key found for this signature in database
GPG Key ID: 15C6254AD19362B4
4 changed files with 29 additions and 11 deletions

View File

@ -91,6 +91,7 @@
"parameters": [ "parameters": [
{ {
"name": "ledger", "name": "ledger",
"description": "Ledger name\n账本名称",
"in": "path", "in": "path",
"required": true, "required": true,
"type": "string" "type": "string"
@ -115,7 +116,8 @@
"type": "object", "type": "object",
"properties": { "properties": {
"name": { "name": {
"type": "string" "type": "string",
"title": "Ledger name\n账本名称"
} }
} }
}, },
@ -123,7 +125,8 @@
"type": "object", "type": "object",
"properties": { "properties": {
"ok": { "ok": {
"type": "boolean" "type": "boolean",
"title": "Boolean value indicating if the ledger is successfully created\n是否创建成功"
} }
} }
}, },
@ -134,7 +137,8 @@
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"title": "List of ledger names\n帐本名称列表"
} }
} }
}, },
@ -142,10 +146,12 @@
"type": "object", "type": "object",
"properties": { "properties": {
"ledger": { "ledger": {
"type": "string" "type": "string",
"title": "Ledger name\n账本名称"
}, },
"transaction": { "transaction": {
"$ref": "#/definitions/apiSendTransactionRequestTransaction" "$ref": "#/definitions/apiSendTransactionRequestTransaction",
"title": "Transaction info\n事务信息"
} }
} }
}, },
@ -178,7 +184,8 @@
"properties": { "properties": {
"hash": { "hash": {
"type": "string", "type": "string",
"format": "byte" "format": "byte",
"title": "Hash of the created transaction\n事务哈希"
} }
} }
}, },

View File

@ -45,7 +45,8 @@
"type": "object", "type": "object",
"properties": { "properties": {
"version": { "version": {
"type": "string" "type": "string",
"title": "Client version\n节点客户端版本"
} }
} }
}, },

View File

@ -208,6 +208,13 @@
"required": true, "required": true,
"type": "string" "type": "string"
}, },
{
"name": "offset",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
},
{ {
"name": "count", "name": "count",
"in": "query", "in": "query",
@ -422,7 +429,8 @@
"type": "string", "type": "string",
"format": "int64" "format": "int64"
} }
} },
"title": "*\n暂不支持"
}, },
"apiBlocksRequest": { "apiBlocksRequest": {
"type": "object", "type": "object",
@ -552,7 +560,8 @@
"HASH", "HASH",
"FULL" "FULL"
], ],
"default": "NONE" "default": "NONE",
"title": "*\n包含事务信息详细程度"
}, },
"apiTransactionFilter": { "apiTransactionFilter": {
"type": "object", "type": "object",

View File

@ -122,8 +122,9 @@ message CountBlocksResponse {
message RecentBlocksRequest { message RecentBlocksRequest {
string ledger = 1; // string ledger = 1; //
int64 count = 2; // int64 offset = 2; //
IncludeTransactions include_transactions = 3; // int64 count = 3; //
IncludeTransactions include_transactions = 4; //
} }
message GetTransactionByHashRequest { message GetTransactionByHashRequest {