public async Task <List <StarWarCharacter> > Search(string query) { SwapiCollectionResponse response = await _httpClient.GetFromJsonAsync <SwapiCollectionResponse>($"/api/people/?search={query}"); return(_mapper.Map <List <SwapiCharacter>, List <StarWarCharacter> >(response.Results)); }
public async Task <List <StarWarCharacter> > GetPeople() { SwapiCollectionResponse response = await _httpClient.GetFromJsonAsync <SwapiCollectionResponse>("/api/people/"); return(_mapper.Map <List <SwapiCharacter>, List <StarWarCharacter> >(response.Results)); }