You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
675 B
Protocol Buffer
31 lines
675 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package recommendservice;
|
|
|
|
message RecArticle {
|
|
int64 id = 1;
|
|
}
|
|
|
|
message RecommendRequest {
|
|
// the id of the request user.
|
|
int64 uid = 1;
|
|
// how many top ranked article for this user.
|
|
int32 topk = 2;
|
|
// current hour
|
|
int32 hour = 3;
|
|
// current minute
|
|
int32 minute = 4;
|
|
// the article list.
|
|
repeated RecArticle articles = 5;
|
|
}
|
|
|
|
message RecommendResponse {
|
|
repeated int64 articles = 1;
|
|
}
|
|
|
|
service RecommendService {
|
|
// the method to get the topk performers for this user.
|
|
rpc recommend1(RecommendRequest) returns (RecommendResponse);
|
|
rpc recommend2(RecommendRequest) returns (RecommendResponse);
|
|
}
|