mirror of
https://codeberg.org/andyscott/OpenWeather-gRPC-API.git
synced 2024-12-21 12:13:09 -05:00
Updated proto files
This commit is contained in:
parent
1987c1725d
commit
7e8c8ec655
3 changed files with 32 additions and 15 deletions
|
@ -4,14 +4,13 @@ package weather;
|
||||||
|
|
||||||
option go_package = "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto";
|
option go_package = "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto";
|
||||||
|
|
||||||
|
import "location_types.proto";
|
||||||
|
|
||||||
message RequestCurrent {
|
message RequestCurrent {
|
||||||
oneof location {
|
//LocationType location_type = 1; NOT IMPLEMENTED YET
|
||||||
string city = 1;
|
string city = 1;
|
||||||
string zip_code = 2;
|
optional string state = 2; // US Only
|
||||||
string coords = 3; // Comma separated coordinates, e.g. "44.5,-123.3"
|
optional string country = 3; // Must be ISO 3166 country code
|
||||||
}
|
|
||||||
optional string state = 4; // US Only
|
|
||||||
optional string country = 5; // Must be ISO 3166 country code
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message SendCurrent {
|
message SendCurrent {
|
||||||
|
|
|
@ -4,15 +4,14 @@ package weather;
|
||||||
|
|
||||||
option go_package = "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto";
|
option go_package = "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto";
|
||||||
|
|
||||||
|
import "location_types.proto";
|
||||||
|
|
||||||
message RequestExtended {
|
message RequestExtended {
|
||||||
oneof location {
|
LocationType location_type = 1;
|
||||||
string city = 1;
|
string location = 2; // zip/postal code, city name, or comma separated coords "-81.2,40.5"
|
||||||
string zip_code = 2;
|
optional string state = 3; // US Only
|
||||||
string coords = 3; // Comma separated coordinates, e.g. "44.5,-123.3"
|
optional string country = 4; // Must be ISO 3166 country code
|
||||||
}
|
uint32 days = 5;
|
||||||
optional string state = 4; // US Only
|
|
||||||
optional string country = 5; // Must be ISO 3166 country code
|
|
||||||
uint32 days = 6;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message SendExtended {
|
message SendExtended {
|
||||||
|
|
19
proto/location_types.proto
Normal file
19
proto/location_types.proto
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package weather;
|
||||||
|
|
||||||
|
option go_package = "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto";
|
||||||
|
|
||||||
|
enum LocationType {
|
||||||
|
LOCATION_TYPE_UNSPECIFIED = 0;
|
||||||
|
LOCATION_CITY = 1;
|
||||||
|
LOCATION_ZIP = 2;
|
||||||
|
LOCATION_COORDS = 3;
|
||||||
|
/*
|
||||||
|
* NOT YET IMPLEMENTED
|
||||||
|
*
|
||||||
|
LOCATION_CITY_STATE = 4;
|
||||||
|
LOCATION_CITY_COUNTRY = 5;
|
||||||
|
LOCATION_ZIP_COUNTRY = 6;
|
||||||
|
*/
|
||||||
|
}
|
Loading…
Reference in a new issue