PRN231_-_FA_2024_-_PE_2885.webp
Riza851

PRN231_-_FA_2024_-_PE_2885.webp

  • Media owner Riza851
  • Ngày thêm
Create an API that searches books where either the title contains the given keyword, or the author's name contains the given keyword. This search should use route data for the keyword. See Figure 2.
Users can search by one or both criteria. If a criterion is not relevant (i.e., not part of the search), the user should use the keyword "*" to indicate that it should be skipped.
URL: [GET]/api/books/search/{title}/{author}
Example 1: GET /api/books/search/OData/Doe/*
(search for books where the title contains "Odata" and author's name contains "Doe")
Example 2: GET/api/books/search/OData/*
(search by title only, search for books where the title contains "OData")
Example 3: GET/api/books/search/*/Doe
(search by author only, search for books where the author's name contains "Doe")
http://localhost:5000/api/Books/search/harry/%2A
Server response
Code
Details
200
Response body
[
"bookId": 2,
"title": "Harry Potter and the Philosopher's Stone",
"authors": [
{ "authorId": 2,
"name": "J.K. Rowling",
"bio": "British author, best known for the Harry Potter series."
"authorId": 3,
"name": "3.R.R. Tolkien",
Zoom
+ 100%
"bio": "English writer, poet, philologist, and academic."
Close
Chưa có bình luận nào.

Thông tin

Category
PRN231
Thêm bởi
Riza851
Ngày thêm
Lượt xem
1,562
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRN231_-_FA_2024_-_PE_2885.webp
File size
169.4 KB
Dimensions
1072px x 858px

Share this media

Back
Bên trên Bottom