text: import axios from "axios";
  const GoogleBooksURL = "https://www.googleapis.com/books/v1/volumes?q=";
  
  export default {
    // Gets all saved books
    getBooks: function () {
      return axios.get("/api/books");
    },
    // Gets the book with the given id
    getBook: function (id) {
      return axios.get("/api/books/" + id);
    },
    // Deletes the book with the given id
    deleteBook: function (id) {
      return axios.delete("/api/books/" + id);
    },
    // Saves a book to the database
    saveBook: function (bookData) {
      return axios.post("/api/books", bookData);
    },
    // Searches the Googlebooks api by the query
    search: function (query) {
      return axios.get(GoogleBooksURL + query);
    },
  };
  