Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add All RPC Endpoints #80

Merged
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
1831874
change proto file, added comments to fields
tobiasjungmann Jul 13, 2022
52d2cf5
Merge branch 'main' into feature/cafeteriaRatingProtoChangesV3
tobiasjungmann Jul 13, 2022
99a6302
fixed merge error in proto file
tobiasjungmann Jul 14, 2022
86904cd
added new stubs for barrier free endpoints
tobiasjungmann Jul 17, 2022
12bd481
changed language fields to iso names (lowercase)
tobiasjungmann Jul 21, 2022
3f81fd2
added stubs without messages
tobiasjungmann Jul 23, 2022
a95e3db
converted meal -> dish, unified ratingTag naming scheme
tobiasjungmann Jul 23, 2022
e2cb358
rating tags with ids, removed unnecessary fields
tobiasjungmann Jul 23, 2022
8deac50
added getDishes endpoint
tobiasjungmann Jul 23, 2022
a6cbe87
added remaining stubs from issue without messages
tobiasjungmann Jul 23, 2022
d05a8a8
added messages until kino stub
tobiasjungmann Jul 23, 2022
3193dbd
added more messages to stubs
tobiasjungmann Jul 23, 2022
f0344b5
added all messages except device stubs
tobiasjungmann Jul 23, 2022
78d2516
added first version of remaining messages
tobiasjungmann Jul 23, 2022
e2fc256
fixing small bug to enable generating
tobiasjungmann Jul 23, 2022
6a21b24
adapted endpoint naming to the names from the android app/ methods in…
tobiasjungmann Jul 27, 2022
4555117
adapted proto file with new call ind error fixes (#76)
tobiasjungmann Jul 3, 2022
3f4a00c
fixed merge error in proto file
tobiasjungmann Jul 14, 2022
6fc2b55
added new stubs for barrier free endpoints
tobiasjungmann Jul 17, 2022
b565354
fixing small bug to enable generating
tobiasjungmann Jul 23, 2022
f2d4d31
removed chat endpoints
tobiasjungmann Jul 27, 2022
e8ca04a
generated stuff
tobiasjungmann Jul 27, 2022
d70755a
Apply suggestions from code review
tobiasjungmann Jul 27, 2022
6d3b370
removed ticket endpoints
tobiasjungmann Jul 27, 2022
54112f8
Merge branch 'main' into protoChanges/barrier-free
tobiasjungmann Jul 28, 2022
464f8b5
rerun generate after merging
tobiasjungmann Jul 30, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,222 changes: 1,660 additions & 562 deletions api/CampusService.pb.go

Large diffs are not rendered by default.

424 changes: 422 additions & 2 deletions api/CampusService.pb.gw.go

Large diffs are not rendered by default.

220 changes: 182 additions & 38 deletions api/CampusService.proto
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ service Campus {
}


// This endpoint retrieves Cafeteria Ratings from the Backend.
rpc GetCafeteriaRatings (CafeteriaRatingRequest) returns (CafeteriaRatingResponse) {
option (google.api.http) = {
post: "/cafeteriaRating/cafeteria/get"
Expand All @@ -74,7 +75,7 @@ service Campus {
}


rpc GetMealRatings (MealRatingsRequest) returns (MealRatingsResponse) {
rpc GetMealRatings (MealRatingRequest) returns (MealRatingResponse) {
option (google.api.http) = {
post: "/cafeteriaRating/dish/get"
body: "*",
Expand Down Expand Up @@ -115,6 +116,43 @@ service Campus {
};
}



rpc getResponsiblePerson (google.protobuf.Empty) returns (getResponsiblePersonResponse) {
option (google.api.http) = {
get: "/barrierfree/contacts",
};
}

rpc getBuilding2Gps (google.protobuf.Empty) returns (getBuilding2GpsResponse) {
option (google.api.http) = {
get: "/barrierfree/getBuilding2Gps",
tobiasjungmann marked this conversation as resolved.
Show resolved Hide resolved
};
}

rpc getAreaFacilitiesByBuildingNr (getAreaFacilitiesByBuildingNrRequest) returns (getAreaFacilitiesByBuildingNrResponse) {
option (google.api.http) = {
get: "/barrierfree/nerby",
tobiasjungmann marked this conversation as resolved.
Show resolved Hide resolved
};
}

rpc getListOfToilets (google.protobuf.Empty) returns (getListOfToiletsResponse) {
option (google.api.http) = {
get: "/barrierfree/listOfToilets",
tobiasjungmann marked this conversation as resolved.
Show resolved Hide resolved
};
}

rpc getListOfElevators (google.protobuf.Empty) returns (getListOfElevatorsResponse) {
option (google.api.http) = {
get: "/barrierfree/listOfElevators",
tobiasjungmann marked this conversation as resolved.
Show resolved Hide resolved
};
}

rpc getMoreInformation (google.protobuf.Empty) returns (getMoreInformationResponse) {
option (google.api.http) = {
get: "/barrierfree/moreInformation",
};
}
}

message GetRoomScheduleRequest {
Expand Down Expand Up @@ -213,112 +251,218 @@ message GetTopNewsReply {
}



message CafeteriaRatingRequest {
// cafeteriaName Mandatory Name of the cafeteria (EAT-API naming scheme)
string cafeteriaName = 1;
// Optional Parameter to define an interval for the ratings (Lower bound)
google.protobuf.Timestamp from = 2;
// Optional Parameter to define an interval for the ratings (Upper bound)
google.protobuf.Timestamp to = 3;
// Optional Parameter defines how many ratings are queried. Default is 3, Maximum is 100 ratings in one request
int32 limit = 4;
}

message MealRatingsRequest {
message MealRatingRequest {
// Mandatory Name of the cafeteria (EAT-API naming scheme)
string cafeteriaName = 1;
// Mandatory Name of the meal (EAT-API naming scheme) Must be available int the given mensa
string meal = 2;
// Optional Parameter to define an interval for the ratings (Lower bound)
google.protobuf.Timestamp from = 3;
// Optional Parameter to define an interval for the ratings (Upper bound)
google.protobuf.Timestamp to = 4;
// Optional Parameter defines how many ratings are queried. Default is 3, Maximum is 100 ratings in one request
int32 limit = 5;
}

message CafeteriaRatingResponse {
repeated CafeteriaRating rating = 1;
double averageRating = 2;
int32 minRating = 3;
int32 maxRating = 4;
repeated TagRatingsResult ratingTags = 5;
double averagePoints = 2;
double standardDeviation = 3;
int32 minPoints = 4;
int32 maxPoints = 5;
repeated TagRatingsResult ratingTags = 6;
}


message MealRatingsResponse {
message MealRatingResponse {
repeated MealRating rating = 1;
double averageRating = 2;
int32 minRating = 3;
int32 maxRating = 4;
repeated TagRatingsResult ratingTags = 5;
repeated TagRatingsResult nameTags = 6;
double averagePoints = 2;
double standardDeviation = 3;
int32 minPoints = 4;
int32 maxPoints = 5;
repeated TagRatingsResult ratingTags = 6;
repeated TagRatingsResult nameTags = 7;
}




message CafeteriaRating{
int32 rating = 1;
// number in the range 1-5
int32 points = 1;
// Mandatory Name of the meal (EAT-API naming scheme) Must be available int the given mensa
string cafeteriaName = 2;
// Optional JPEG image in Base64
bytes image = 3;
google.protobuf.Timestamp cafeteriaVisitedAt = 4;
string comment = 5;
repeated TagRatingOverview tagRating = 6;
// Optional comment (max 256 chars)
string comment = 4;
repeated TagRatingResult tagRating = 5;
google.protobuf.Timestamp cafeteriaVisitedAt = 6;
}

message MealRating{
int32 rating = 1;
// number in the range 1-5
int32 points = 1;
// Mandatory Name of the meal (EAT-API naming scheme) Must be available int the given mensa
string cafeteriaName = 2;
// Mandatory Name of the meal (EAT-API naming scheme) Must be available int the given mensa
string meal = 3;
// Optional JPEG image in Base64
bytes image = 4;
google.protobuf.Timestamp cafeteriaVisitedAt = 5;
string comment = 6;
repeated TagRatingOverview tagRating = 7;
// Optional comment (max 256 chars)
string comment = 5;
repeated TagRatingResult tagRating = 6;
google.protobuf.Timestamp cafeteriaVisitedAt = 7;
}


message NewCafeteriaRatingRequest{
int32 rating = 1;
// number in the range 1-5
int32 points = 1;
string cafeteriaName = 2;
bytes image = 3;
// Optional list of tag ratings add as many tags with a rating (1-5) of the list of cafeteriaRatingTags
repeated TagRating tags = 4;
google.protobuf.Timestamp cafeteriaVisitedAt = 5;
// Optional comment (max 256 chars)
string comment = 6;
}

message NewMealRatingRequest{
int32 rating = 1;
// number in the range 1-5
int32 points = 1;
// Mandatory Name of the meal (EAT-API naming scheme) Must be available int the given mensa
string cafeteriaName = 2;
// Mandatory Name of the meal (EAT-API naming scheme) Must be available int the given mensa
string meal = 3;
// Optional JPEG image in Base64
bytes image = 4;
// Optional list of tag ratings add as many tags with a rating (1-5) of the list of mealRatingTags
repeated TagRating tags = 5;
google.protobuf.Timestamp cafeteriaVisitedAt = 6;
// Optional comment (max 256 chars)
string comment = 7;
}

message GetRatingTagsReply{
repeated TagRatingOverview tags=1;
repeated TagRatingOverview tags = 1;
}


message TagRatingOverview {
string nameDE = 1;
string nameEN = 2;
double rating = 3;
string DE = 1;
string EN = 2;
}

message TagRatingResult {
string DE = 1;
string EN = 2;
int32 points = 3;
}

message TagRating {
string tag = 1;
double rating = 2;
double points = 2;
}

message TagRatingsResult {
string nameDE = 1;
string nameEN = 2;
double averageRating = 3;
int32 minRating = 4;
int32 maxRating = 5;
string DE = 1;
string EN = 2;
double averagePoints = 3;
double standardDeviation = 4;
int32 minPoints = 5;
int32 maxPoints = 6;
}



message GetCafeteriaResponse{
string name=1;
string adress=2;
double longitude=3;
double latitude=4;
repeated Cafeteria cafeteria = 1;
}

message Cafeteria{
string name = 1;
string address = 2;
double longitude = 3;
double latitude = 4;
}



message getResponsiblePersonResponse {
repeated ResponsiblePersonElement responsiblePerson = 1;
}

message ResponsiblePersonElement{
string name = 1;
string telephone = 2;
string email = 3;
string faculty = 4;
string tumID = 5;

}

message getBuilding2GpsResponse {
repeated Building2GpsElement building2Gps = 1;
}

message Building2GpsElement{
string id=1;
string latitude=2;
string longitude=3;

}

message getAreaFacilitiesByBuildingNrResponse {
repeated RoomInformationElement areaFacilitiesByBuildingNr = 1;
}



message getAreaFacilitiesByBuildingNrRequest {
string building_nr = 1;
}

message getListOfToiletsResponse {
repeated RoomInformationElement listOfToilets = 1;
}

message RoomInformationElement{
int32 room_id = 1;
string room_code = 2;
string building_nr = 3;
string arch_id = 4;
string info = 5;
string address = 6;
string purpose = 7;
string campus = 8;
string name = 9;
}

message getListOfElevatorsResponse {
repeated RoomInformationElement listOfElevators = 1;
}



message getMoreInformationResponse {
repeated MoreInformationElement information = 1;
}

message MoreInformationElement{
string title = 1;
string category = 2;
string url = 3;
}


Expand Down
Loading