mirror of
https://codeberg.org/andyscott/OpenWeather-gRPC-API.git
synced 2024-12-20 12:03:10 -05:00
Update documentation
This commit is contained in:
parent
715d5e3533
commit
51c183116e
2 changed files with 29 additions and 26 deletions
|
@ -4,13 +4,31 @@ package weather;
|
|||
|
||||
option go_package = "codeberg.org/andcscott/OpenWeather-gRPC-API/proto";
|
||||
|
||||
// Sub-message for Coordinates
|
||||
/* Get the latitude and longitude for a given location
|
||||
* Commented parameters in the message definition are not implemeneted yet
|
||||
* location_type {LocationType} - name or value of the desired LocationType enum
|
||||
* location {OneOfLocation} - city name, zip code, or coordinates
|
||||
*/
|
||||
message RequestLocation {
|
||||
LocationType location_type = 1;
|
||||
OneOfLocation location = 2;
|
||||
}
|
||||
|
||||
// Response to RequestLocation
|
||||
message SendLocation {
|
||||
float latitude = 1;
|
||||
float longitude = 2;
|
||||
}
|
||||
|
||||
// Sub-message for OneOfLocation
|
||||
// Used to specify actual coordinates for the desired location
|
||||
message Coordinates {
|
||||
float latitude = 1;
|
||||
float longitude = 2;
|
||||
}
|
||||
|
||||
// Sub-message for RequestLocation
|
||||
// Sub-message for RequestLocation, RequestCurrent, and RequestFiveDay
|
||||
// Used to specify the desired location: city, zip code, or coordinates.
|
||||
message OneOfLocation {
|
||||
oneof location_id {
|
||||
string city = 1;
|
||||
|
@ -30,19 +48,3 @@ enum LocationType {
|
|||
LOCATION_TYPE_ZIP_CODE = 2;
|
||||
LOCATION_TYPE_COORDS = 3;
|
||||
}
|
||||
|
||||
/* Get the latitude and longitude for a given location
|
||||
* Commented parameters in the message definition are not implemeneted yet
|
||||
* location_type {LocationType} - name or value of the desired LocationType enum
|
||||
* location {OneOfLocation} - city name, zip code, or coordinates
|
||||
*/
|
||||
message RequestLocation {
|
||||
LocationType location_type = 1;
|
||||
OneOfLocation location = 2;
|
||||
}
|
||||
|
||||
// Response to RequestLocation
|
||||
message SendLocation {
|
||||
float latitude = 1;
|
||||
float longitude = 2;
|
||||
}
|
||||
|
|
|
@ -6,14 +6,6 @@ option go_package = "codeberg.org/andcscott/OpenWeather-gRPC-API/proto";
|
|||
|
||||
import "location.proto";
|
||||
|
||||
// Sub-message used by Current & Extended to specify preferred units
|
||||
enum Units {
|
||||
UNITS_UNSPECIFIED = 0;
|
||||
UNITS_STANDARD = 1;
|
||||
UNITS_METRIC = 2;
|
||||
UNITS_IMPERIAL = 3;
|
||||
}
|
||||
|
||||
/* Get the current forecast for a given location
|
||||
* location_type {LocationType} - name or value of the desired LocationType enum
|
||||
* units {Units} - name or value of the desired Units enum
|
||||
|
@ -45,3 +37,12 @@ message RequestFiveDay {
|
|||
message SendFiveDay {
|
||||
string payload = 1;
|
||||
}
|
||||
|
||||
// Sub-message used by Current & Extended to specify preferred units
|
||||
// If unspecified, results will default to standard (temperature in Kelvin)
|
||||
enum Units {
|
||||
UNITS_UNSPECIFIED = 0;
|
||||
UNITS_STANDARD = 1;
|
||||
UNITS_METRIC = 2;
|
||||
UNITS_IMPERIAL = 3;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue