Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
microservices
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aung, Htet (PG/T - Comp Sci & Elec Eng)
microservices
Commits
f9c605db
Commit
f9c605db
authored
3 months ago
by
Aung, Htet (PG/T - Comp Sci & Elec Eng)
Browse files
Options
Downloads
Patches
Plain Diff
Edit showtimes.py
parent
fd5e32b3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
showtimes.py
+10
-1
10 additions, 1 deletion
showtimes.py
with
10 additions
and
1 deletion
showtimes.py
+
10
−
1
View file @
f9c605db
...
...
@@ -28,11 +28,20 @@ def showtimes_list():
@app.route
(
"
/showtimes/<date>
"
,
methods
=
[
'
GET
'
])
movies_service
=
"
http://127.0.0.1:5001/movies/{}
"
#we know this is where the service is running. We replace the {} with the actual ID of the movie we want.
def
showtimes_record
(
date
):
if
date
not
in
showtimes
:
raise
NotFound
print
(
showtimes
[
date
])
return
nice_json
(
showtimes
[
date
])
result
=
[]
for
movie_id
in
showtimes
[
date
]:
resp
=
requests
.
get
(
movies_service
.
format
(
movie_id
))
result
.
append
(
resp
.
json
()[
"
title
"
])
return
nice_json
(
result
)
if
__name__
==
"
__main__
"
:
app
.
run
(
port
=
5002
,
debug
=
True
)
This diff is collapsed.
Click to expand it.
Aung, Htet (PG/T - Comp Sci & Elec Eng)
@ha02133
·
3 months ago
Author
Owner
updated showtimes_record
updated showtimes_record
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment