OpenWeather-gRPC-API/proto/weather.proto

57 lines
1.6 KiB
Protocol Buffer

syntax = "proto3";
package weather;
option go_package = "codeberg.org/andcscott/OpenWeatherMap-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
* Commented parameters in the message definition are not implemeneted yet
* location_type {enum} - name or value
* units {enum} - name or value
* city {string} - case insensitive, spaces and punctuation allowed
* zip_code {string} - non-numeric values permitted
* coordinates {Coordinates} - Coordinates message with latitude and longitude
*/
message RequestCurrent {
LocationType location_type = 1;
Units units = 2;
optional string city = 3;
optional string zip_code = 4;
optional Coordinates coordinates = 5;
}
// Response to RequestCurrent
message SendCurrent {
string payload = 1;
}
/* Get the extended forecast for a given location up to 16 days in the future
* Commented parameters in the message definition are not implemeneted yet
* location_type {enum} - name or value
* units {enum} - name or value
* city {string} - case insensitive, spaces and punctuation allowed
* zip_code {string} - non-numeric values permitted
* coordinates {Coordinates} - Coordinates message with latitude and longitude
*/
message RequestFiveDay {
LocationType location_type = 1;
Units units = 2;
optional string city = 3;
optional string zip_code = 4;
optional Coordinates coordinates = 5;
}
// Response to RequestExtended
message SendFiveDay {
string payload = 1;
}