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

feat(movie-1):Implementation of the GetMovies api #213

Merged
merged 30 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c3865bc
api changes
CommanderStorm Sep 5, 2023
e722805
implemented a cronjob to save to the db
CommanderStorm Sep 5, 2023
07ec50c
implemnted the api
CommanderStorm Sep 5, 2023
bbbe553
fixed imdb rating
CommanderStorm Sep 7, 2023
b01dab1
Merge branch 'main' into feature/kino-api
CommanderStorm Sep 14, 2023
c75b880
regen
CommanderStorm Sep 14, 2023
5fffeeb
Merge branch 'main' into feature/kino-api
CommanderStorm Sep 18, 2023
f204494
fixed the naming of MovieMsgElement
CommanderStorm Sep 18, 2023
ba654dd
fixed naming
CommanderStorm Sep 19, 2023
d6817da
fixed usages of sql instead of the null shortcuts
CommanderStorm Sep 19, 2023
1ea3484
Merge branch 'main' into feature/kino-api
CommanderStorm Sep 19, 2023
ca1404d
Update server/api/tumdev/campus_backend.proto
CommanderStorm Sep 19, 2023
608e2aa
fixed the naming of ReleaseYear
CommanderStorm Sep 19, 2023
782f570
hardcoded the news source
CommanderStorm Sep 19, 2023
ca30299
added the removal of the the TU Film newssource
CommanderStorm Sep 19, 2023
4d6123a
Update server/backend/cron/movies.go
CommanderStorm Sep 19, 2023
e342277
fixed naming things imdb if they should be omdb
CommanderStorm Sep 19, 2023
c032370
fixed one migration having a longer name
CommanderStorm Sep 19, 2023
0babcbd
Merge branch 'main' into feature/kino-api
CommanderStorm Sep 19, 2023
4c91ba2
fixed issues in the rebase
CommanderStorm Sep 19, 2023
2a99203
added context
CommanderStorm Sep 19, 2023
ccce10b
extracted the imdb parsing to another function and added a testcase
CommanderStorm Sep 19, 2023
98e1ebf
replaced anothe instance of null.Int with null.IntFrom
CommanderStorm Sep 19, 2023
19b87b1
Merge branch 'main' into feature/kino-api
CommanderStorm Sep 20, 2023
9303296
Merge branch 'main' into feature/kino-api
CommanderStorm Sep 20, 2023
a2c2314
linting fixes
CommanderStorm Sep 20, 2023
c420900
rebase
CommanderStorm Sep 21, 2023
c04c21a
Merge branch 'main' into feature/kino-api
CommanderStorm Sep 21, 2023
5d51e57
Merge branch 'main' into feature/kino-api
CommanderStorm Sep 21, 2023
8f8dd3b
Merge branch 'main' into feature/kino-api
CommanderStorm Sep 22, 2023
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
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ services:
- APNS_TEAM_ID=${APNS_TEAM_ID}
- APNS_P8_FILE_PATH=${APNS_P8_FILE_PATH}
- MensaCronDisabled=true
- OMDB_API_KEY=${OMDB_API_KEY}
- CAMPUS_API_TOKEN=${CAMPUS_API_TOKEN}
volumes:
- backend-storage:/Storage
Expand Down
808 changes: 403 additions & 405 deletions server/api/tumdev/campus_backend.pb.go

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions server/api/tumdev/campus_backend.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 18 additions & 13 deletions server/api/tumdev/campus_backend.proto
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ service Campus {
option (google.api.http) = {get: "/studyrooms"};
}

rpc GetKino(GetKinoRequest) returns (GetKinoReply) {
option (google.api.http) = {get: "/kino/{last_id}"};
rpc GetMovies(GetMoviesRequest) returns (GetMoviesReply) {
option (google.api.http) = {get: "/movies/{last_id}"};
}

rpc SendFeedback(SendFeedbackRequest) returns (SendFeedbackReply) {
Expand Down Expand Up @@ -506,30 +506,35 @@ message StudyRoom {
string building_name = 5;
}

message GetKinoRequest {
message GetMoviesRequest {
// the last Id you have requested. Use -1 to get all movies
int32 last_id = 1;
}

message GetKinoReply {
repeated KinoMsgElement kinos = 1;
message GetMoviesReply {
repeated Movie movies = 1;
}

message KinoMsgElement {
string name = 1;
string path = 2;
int32 kino = 3;
message Movie {
string cover_name = 1;
string cover_path = 2;
int64 movie_id = 3;
google.protobuf.Timestamp date = 4;
google.protobuf.Timestamp created = 5;
string title = 6;
string year = 7;
// release year of the movie
string release_year = 7;
string runtime = 8;
string genre = 9;
string director = 10;
string actors = 11;
string rating = 12;
// imdb rating
string imdb_rating = 12;
string description = 13;
int32 cover = 14;
string trailer = 15;
int64 cover_id = 14;
// was previously the trailer
reserved 15;
// Where to find additional information about this movie
string link = 16;
}

Expand Down
81 changes: 41 additions & 40 deletions server/api/tumdev/campus_backend.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -641,14 +641,14 @@
]
}
},
"/kino/{lastId}": {
"/members/{lrzId}": {
"get": {
"operationId": "Campus_GetKino",
"operationId": "Campus_GetMembers",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/apiGetKinoReply"
"$ref": "#/definitions/apiGetMembersReply"
}
},
"default": {
Expand All @@ -660,26 +660,25 @@
},
"parameters": [
{
"name": "lastId",
"name": "lrzId",
"in": "path",
"required": true,
"type": "integer",
"format": "int32"
"type": "string"
}
],
"tags": [
"Campus"
]
}
},
"/members/{lrzId}": {
"/movies/{lastId}": {
"get": {
"operationId": "Campus_GetMembers",
"operationId": "Campus_GetMovies",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/apiGetMembersReply"
"$ref": "#/definitions/apiGetMoviesReply"
}
},
"default": {
Expand All @@ -691,10 +690,12 @@
},
"parameters": [
{
"name": "lrzId",
"name": "lastId",
"description": "the last Id you have requested. Use -1 to get all movies",
"in": "path",
"required": true,
"type": "string"
"type": "integer",
"format": "int32"
}
],
"tags": [
Expand Down Expand Up @@ -1220,18 +1221,6 @@
}
}
},
"apiGetKinoReply": {
"type": "object",
"properties": {
"kinos": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/apiKinoMsgElement"
}
}
}
},
"apiGetMembersReply": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1259,6 +1248,18 @@
}
}
},
"apiGetMoviesReply": {
"type": "object",
"properties": {
"movies": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/apiMovie"
}
}
}
},
"apiGetNameTagsReply": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1434,18 +1435,18 @@
}
}
},
"apiKinoMsgElement": {
"apiMovie": {
"type": "object",
"properties": {
"name": {
"coverName": {
"type": "string"
},
"path": {
"coverPath": {
"type": "string"
},
"kino": {
"type": "integer",
"format": "int32"
"movieId": {
"type": "string",
"format": "int64"
},
"date": {
"type": "string",
Expand All @@ -1458,8 +1459,9 @@
"title": {
"type": "string"
},
"year": {
"type": "string"
"releaseYear": {
"type": "string",
"title": "release year of the movie"
},
"runtime": {
"type": "string"
Expand All @@ -1473,21 +1475,20 @@
"actors": {
"type": "string"
},
"rating": {
"type": "string"
"imdbRating": {
"type": "string",
"title": "imdb rating"
},
"description": {
"type": "string"
},
"cover": {
"type": "integer",
"format": "int32"
},
"trailer": {
"type": "string"
"coverId": {
"type": "string",
"format": "int64"
},
"link": {
"type": "string"
"type": "string",
"title": "Where to find additional information about this movie"
}
}
},
Expand Down
Loading