A React-based Google Books Search that displays books on user searches. This application search for books using the Google Books API by typing in a title and clicking on “Search”. The user can view the book which will bring them to the page on Google Books by clicking “View” in the results for the search. Future update will be working on the “Save Book” button to save the book to the database.
- Title - Title of the book from the Google Books API
- Authors - The books’s author(s) as returned from the Google Books API
- Description - The book’s description as returned from the Google Books API
- Image - The Book’s thumbnail image as returned from the Google Books API
- Link - The Book’s information link as returned from the Google Books API
- Authors: [“Isabel Allende”]
- Description: “The House of The Spirits.
- Spectacular…An absorbing and distinguished work…The House of the Spirits with its all-informing, generous, and humane >- Sensibility, is a unique achievement, both personal witness and possible allegory of the past, present, and future of Latin America.” —The New York Times”
- Image: “https://www.isabelallende.com/en/book/house”
- Link: “https://books.google.com/booksid=EbypCgAAQBAJ&printsec=frontcover&dq=isabel++allende&hl=&cd=1&source=gbs_api#v=onepage&q=isabel%20%20allende&f=false” Title: “The House of The Spirits”
- MVC design pattern: Model, View, Controller.
https://www.googleapis.com/books/v1/volumes?q=${query}
);
},
// Delete book with the given id
deleteBook: function (id) {
return axios.delete(“/api/books/” + id).then(result => result.data);
},
// Save book to the database
saveBook: function (bookData) {
return axios.post(“/api/books”, bookData).then(result => result.data);
},
// Get saved books from the database
savedBooks: function () {
return axios.get(“/api/books”).then(result => result.data);
}```
- Node.js - Download the latest version of Node(https://nodejs.org/en/)
- Created a Mongo Database called “google Book”.
- Angel-Cochachez. MERN Stack Developer @codifyme:+1 :shipit:
- Happy Book Searching!