Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sp21-cs242-assignment2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
zshan2
sp21-cs242-assignment2
Merge requests
!1
<assignment-2.1>
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
<assignment-2.1>
assignment-2.1
into
master
Overview
0
Commits
9
Pipelines
0
Changes
9
Merged
zshan2
requested to merge
assignment-2.1
into
master
4 years ago
Overview
0
Commits
9
Pipelines
0
Changes
9
Expand
2.1
0
0
Merge request reports
Viewing commit
0b872741
Prev
Next
Show latest version
9 files
+
264
−
51
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
9
Search (e.g. *.vue) (Ctrl+P)
0b872741
assignment2.1 final version
· 0b872741
zshan2
authored
4 years ago
Client/CLI.py
+
8
−
0
Options
@@ -140,6 +140,14 @@ def put():
else
:
print
(
"
Unknown command
"
)
back_to_main_page
()
if
re
.
search
(
"
books
"
,
query
):
if
len
(
data
)
<=
1
:
print
(
"
For posting multiple books, please input json file has more than 1 books
\n
"
)
main_page
()
else
:
if
len
(
data
)
>
1
:
print
(
"
Cannot post more than one book with
'
post book/author
'
, please use
'
post books/authors
'"
)
main_page
()
result
=
API
.
put
(
query
,
data
)
typer
.
echo
(
result
)
print
()
Loading