Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request grpc-ecosystem#54 from tronprotocol/update_paginat…
Browse files Browse the repository at this point in the history
…ed_api

update paginated api
  • Loading branch information
huzhenyuan authored May 24, 2018
2 parents 6ff00a2 + 29fb6f9 commit 2135552
Showing 1 changed file with 40 additions and 3 deletions.
43 changes: 40 additions & 3 deletions api/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ service WalletSolidity {
}
};
}
rpc GetTransactionsByTimestamp (TimeMessage) returns (TransactionList) {
rpc GetTransactionsByTimestamp (TimePaginatedMessage) returns (TransactionList) {
option (google.api.http) = {
post: "/walletsolidity/gettransactionsbytimestamp"
body: "*"
Expand All @@ -377,7 +377,16 @@ service WalletSolidity {
}
};
}
rpc GetTransactionsFromThis (Account) returns (TransactionList) {
rpc GetTransactionsByTimestampCount (TimeMessage) returns (NumberMessage) {
option (google.api.http) = {
post: "/walletsolidity/gettransactionsbytimestampcount"
body: "*"
additional_bindings {
get: "/walletsolidity/gettransactionsbytimestampcount"
}
};
}
rpc GetTransactionsFromThis (AccountPaginated) returns (TransactionList) {
option (google.api.http) = {
post: "/walletsolidity/gettransactionsfromthis"
body: "*"
Expand All @@ -386,7 +395,7 @@ service WalletSolidity {
}
};
}
rpc GetTransactionsToThis (Account) returns (TransactionList) {
rpc GetTransactionsToThis (AccountPaginated) returns (TransactionList) {
option (google.api.http) = {
post: "/walletsolidity/gettransactionstothis"
body: "*"
Expand All @@ -395,6 +404,24 @@ service WalletSolidity {
}
};
}
rpc GetTransactionsFromThisCount (Account) returns (NumberMessage) {
option (google.api.http) = {
post: "/walletsolidity/gettransactionsfromthiscount"
body: "*"
additional_bindings {
get: "/walletsolidity/gettransactionsfromthiscount"
}
};
}
rpc GetTransactionsToThisCount (Account) returns (NumberMessage) {
option (google.api.http) = {
post: "/walletsolidity/gettransactionstothiscount"
body: "*"
additional_bindings {
get: "/walletsolidity/gettransactionstothiscount"
}
};
}
};

// the api of tron's db
Expand Down Expand Up @@ -493,3 +520,13 @@ message TransactionLimit {
bytes transactionId = 1;
int64 limitNum = 2;
}
message AccountPaginated {
Account account = 1;
int64 offset = 2;
int64 limit = 3;
}
message TimePaginatedMessage {
TimeMessage timeMessage = 1;
int64 offset = 2;
int64 limit = 3;
}

0 comments on commit 2135552

Please sign in to comment.