mirror of
https://codeberg.org/andyscott/OpenWeather-gRPC-API.git
synced 2024-11-05 05:20:48 -05:00
Update 'README.md'
This commit is contained in:
parent
f3e9194a98
commit
2156908022
1 changed files with 13 additions and 15 deletions
28
README.md
28
README.md
|
@ -84,21 +84,19 @@ In this case, we're requesting the current weather for Corvallis, OR.
|
|||
|
||||
```
|
||||
func doCurrent(c pb.WeatherServiceClient) {
|
||||
|
||||
res, err := c.Current(context.Background(), &pb.RequestCurrent{
|
||||
LocationType: pb.LocationType_LOCATION_TYPE_CITY,
|
||||
Units: pb.Units_UNITS_METRIC,
|
||||
Location: &pb.OneOfLocation{
|
||||
LocationId: &pb.OneOfLocation_City{
|
||||
City: "Corvallis",
|
||||
},
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
log.Println(res.Payload)
|
||||
res, err := c.Current(context.Background(), &pb.RequestCurrent{
|
||||
LocationType: pb.LocationType_LOCATION_TYPE_CITY,
|
||||
Units: pb.Units_UNITS_METRIC,
|
||||
Location: &pb.OneOfLocation{
|
||||
LocationId: &pb.OneOfLocation_City{
|
||||
City: "Corvallis",
|
||||
},
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
log.Println(res.Payload)
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue