public async Task <APIResult <Neighbor[]> > GetNeighbors() { GetNeighborsRequest getNeighborsRequest = new GetNeighborsRequest(); var response = await genericWebClient.RequestAsync <GetNeighborsResponse>(getNeighborsRequest); return(response?.RePackage(r => r.Neighbors)); }
public async Task <Neighbor[]> GetNeighbors() { GetNeighborsRequest getNeighborsRequest = new GetNeighborsRequest(); var response = await genericClient.RequestAsync <GetNeighborsResponse>(getNeighborsRequest); if (response == null) { throw new NullReferenceException(nameof(response)); } return(response.Neighbors); }