mirror of
https://codeberg.org/andyscott/OpenWeather-gRPC-API.git
synced 2024-12-21 12:13:09 -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) {
|
func doFiveDay(c pb.WeatherServiceClient) {
|
||||||
|
|
||||||
res, err := c.FiveDay(context.Background(), &pb.RequestFiveDay{
|
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,
|
Units: pb.Units_UNITS_METRIC,
|
||||||
Location: &pb.OneOfLocation{
|
Location: &pb.OneOfLocation{
|
||||||
LocationId: &pb.OneOfLocation_City{
|
LocationId: &pb.OneOfLocation_ZipCode{
|
||||||
City: "",
|
ZipCode: "97330",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -12,7 +12,10 @@ func doLocation(c pb.WeatherServiceClient) {
|
||||||
res, err := c.Location(context.Background(), &pb.RequestLocation{
|
res, err := c.Location(context.Background(), &pb.RequestLocation{
|
||||||
LocationType: pb.LocationType_LOCATION_TYPE_CITY,
|
LocationType: pb.LocationType_LOCATION_TYPE_CITY,
|
||||||
Location: &pb.OneOfLocation{
|
Location: &pb.OneOfLocation{
|
||||||
LocationId: &pb.OneOfLocation_City{City: "Corvallis"}},
|
LocationId: &pb.OneOfLocation_City{
|
||||||
|
City: "Corvallis",
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -19,6 +19,6 @@ func main() {
|
||||||
c := pb.NewWeatherServiceClient(conn)
|
c := pb.NewWeatherServiceClient(conn)
|
||||||
|
|
||||||
//doCurrent(c)
|
//doCurrent(c)
|
||||||
doFiveDay(c)
|
//doFiveDay(c)
|
||||||
//doLocation(c)
|
doLocation(c)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue