diff --git a/test-client/current.go b/test-client/current.go index a6e13f5..e743e49 100644 --- a/test-client/current.go +++ b/test-client/current.go @@ -10,7 +10,13 @@ import ( func doCurrent(c pb.WeatherServiceClient) { res, err := c.Current(context.Background(), &pb.RequestCurrent{ - City: "Corvallis", + LocationType: pb.LocationType_LOCATION_TYPE_ZIP_CODE, + Units: pb.Units_UNITS_METRIC, + Location: &pb.OneOfLocation{ + LocationId: &pb.OneOfLocation_ZipCode{ + ZipCode: "97330", + }, + }, }) if err != nil { log.Fatalln(err) diff --git a/test-client/extended.go b/test-client/extended.go index 4442593..df39b8b 100644 --- a/test-client/extended.go +++ b/test-client/extended.go @@ -7,11 +7,16 @@ import ( pb "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto" ) -func doExtended(c pb.WeatherServiceClient) { +func doFiveDay(c pb.WeatherServiceClient) { - res, err := c.Extended(context.Background(), &pb.RequestExtended{ - City: "Corvallis", - Days: 7, + res, err := c.FiveDay(context.Background(), &pb.RequestFiveDay{ + LocationType: pb.LocationType_LOCATION_TYPE_CITY, + Units: pb.Units_UNITS_IMPERIAL, + Location: &pb.OneOfLocation{ + LocationId: &pb.OneOfLocation_City{ + City: "Corvalls", + }, + }, }) if err != nil { log.Fatalln(err) diff --git a/test-client/location.go b/test-client/location.go index 38bb21f..2c170e3 100644 --- a/test-client/location.go +++ b/test-client/location.go @@ -10,8 +10,11 @@ import ( func doLocation(c pb.WeatherServiceClient) { res, err := c.Location(context.Background(), &pb.RequestLocation{ - City: "Corvallis", + LocationType: pb.LocationType_LOCATION_TYPE_CITY, + Location: &pb.OneOfLocation{ + LocationId: &pb.OneOfLocation_City{City: "Corvallis"}}, }) + if err != nil { log.Fatalln(err) }