♻️ Remove the discovery service in the Sphere.
This commit is contained in:
@@ -86,6 +86,8 @@ message GetUserRealmsResponse {
|
||||
|
||||
message GetPublicRealmsRequest {
|
||||
optional string order_by = 1;
|
||||
int32 take = 2;
|
||||
bool is_community = 3;
|
||||
}
|
||||
|
||||
message GetPublicRealmsResponse {
|
||||
|
||||
@@ -27,11 +27,12 @@ public class RemoteRealmService(RealmService.RealmServiceClient realms)
|
||||
return response.RealmIds.Select(Guid.Parse).ToList();
|
||||
}
|
||||
|
||||
public async Task<List<SnRealm>> GetPublicRealms(string orderBy = "date")
|
||||
public async Task<List<SnRealm>> GetPublicRealms(string orderBy = "date", int take = 20)
|
||||
{
|
||||
var response = await realms.GetPublicRealmsAsync(new GetPublicRealmsRequest
|
||||
{
|
||||
OrderBy = orderBy
|
||||
OrderBy = orderBy,
|
||||
Take = take
|
||||
});
|
||||
return response.Realms.Select(SnRealm.FromProtoValue).ToList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user