mirror of
https://codeberg.org/andyscott/OpenWeather-gRPC-API.git
synced 2024-12-20 12:03:10 -05:00
Minor updates
This commit is contained in:
parent
7e51085b1a
commit
daff7e7cef
3 changed files with 9 additions and 6 deletions
|
@ -10,11 +10,11 @@ import (
|
|||
func doFiveDay(c pb.WeatherServiceClient) {
|
||||
|
||||
res, err := c.FiveDay(context.Background(), &pb.RequestFiveDay{
|
||||
LocationType: pb.LocationType_LOCATION_TYPE_CITY,
|
||||
LocationType: pb.LocationType_LOCATION_TYPE_UNSPECIFIED,
|
||||
Units: pb.Units_UNITS_METRIC,
|
||||
Location: &pb.OneOfLocation{
|
||||
LocationId: &pb.OneOfLocation_City{
|
||||
City: "",
|
||||
LocationId: &pb.OneOfLocation_ZipCode{
|
||||
ZipCode: "97330",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
@ -12,7 +12,10 @@ func doLocation(c pb.WeatherServiceClient) {
|
|||
res, err := c.Location(context.Background(), &pb.RequestLocation{
|
||||
LocationType: pb.LocationType_LOCATION_TYPE_CITY,
|
||||
Location: &pb.OneOfLocation{
|
||||
LocationId: &pb.OneOfLocation_City{City: "Corvallis"}},
|
||||
LocationId: &pb.OneOfLocation_City{
|
||||
City: "Corvallis",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
|
|
|
@ -19,6 +19,6 @@ func main() {
|
|||
c := pb.NewWeatherServiceClient(conn)
|
||||
|
||||
//doCurrent(c)
|
||||
doFiveDay(c)
|
||||
//doLocation(c)
|
||||
//doFiveDay(c)
|
||||
doLocation(c)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue