This commit is contained in:
parent
2cd43ee2d6
commit
00e724ffa4
@ -18,7 +18,8 @@ public class NostrServicesClient
|
||||
|
||||
public async Task<CompactProfile?> Profile(string id)
|
||||
{
|
||||
return await Get<CompactProfile>(HttpMethod.Get, $"https://nostr-rs.api.v0l.io/event/0/{id}");
|
||||
var ev = await Get<NostrEvent>(HttpMethod.Get, $"https://nostr-rs.api.v0l.io/event/0/{id}");
|
||||
return ev != default ? CompactProfile.FromNostrEvent(ev) : default;
|
||||
}
|
||||
|
||||
public async Task<NostrEvent?> Event(string id)
|
||||
@ -33,7 +34,7 @@ public class NostrServicesClient
|
||||
|
||||
public async Task<List<RelayDistance>?> CloseRelays(double lat, double lon, int count = 5)
|
||||
{
|
||||
return await Get<List<RelayDistance>>(HttpMethod.Post, $"/api/v1/relays?count={count}", new {lat, lon});
|
||||
return await Get<List<RelayDistance>>(HttpMethod.Post, $"/api/v1/relays?count={count}", new { lat, lon });
|
||||
}
|
||||
|
||||
public async Task<List<RelayDistance>?> TopRelays(int count = 5)
|
||||
@ -64,4 +65,4 @@ public class NostrServicesClient
|
||||
|
||||
return default;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user