-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexplore-service.proto
42 lines (34 loc) · 1.2 KB
/
explore-service.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
syntax = "proto3";
package explore;
service ExploreService {
rpc ListLikedYou(ListLikedYouRequest) returns (ListLikedYouResponse); // List all users who liked the recipient
rpc ListNewLikedYou(ListLikedYouRequest) returns (ListLikedYouResponse); // List all users who liked the recipient excluding those who have been liked in return
rpc CountLikedYou(CountLikedYouRequest) returns (CountLikedYouResponse); // Count the number of users who liked the recipient
rpc PutDecision(PutDecisionRequest) returns (PutDecisionResponse); // Record the decision of the actor to like or pass the recipient
}
message ListLikedYouRequest {
string recipient_user_id = 1;
optional string pagination_token = 2;
}
message ListLikedYouResponse {
message Liker {
string actor_id = 1;
uint64 unix_timestamp = 2;
}
repeated Liker likers = 1;
optional string next_pagination_token = 2;
}
message CountLikedYouRequest {
string recipient_user_id = 1;
}
message CountLikedYouResponse {
uint64 count = 1;
}
message PutDecisionRequest {
string actor_user_id = 1;
string recipient_user_id = 2;
bool liked_recipient = 3;
}
message PutDecisionResponse {
bool mutual_likes = 1; // True if both users like each other
}