public IEnumerable <Domain.Entities.StarShip> GetAll() { var response = httpRestClient.Get(resource); var responseContent = HttpRestClientHelper.GetResultStreamAsString(response); var starShips = jsonSerializer.Deserialize <IEnumerable <Domain.Entities.StarShip> >(responseContent); return(starShips); }
public Domain.Entities.StarLogPage GetStarshipsByPage(int?page = 1) { var param = $"?page={page}"; var response = httpRestClient.Get(resource, param); var responseContent = HttpRestClientHelper.GetResultStreamAsString(response); var starlogPage = jsonSerializer.Deserialize <Domain.Entities.StarLogPage>(responseContent); return(starlogPage); }