diff --git a/script.js b/script.js index 0acc2ab..20a5801 100644 --- a/script.js +++ b/script.js @@ -35,6 +35,7 @@ const api = { id_goodreads,id_amazon` }, author: { + url: 'search/authors.json?q=', params: '' }, @@ -74,83 +75,85 @@ const api = { bookContainer.replaceChildren(''); for (book of books) { + console.log(book); if (books == userBooks.favorites) console.log('parsing favorites...'); + // book's unique OL ID let olid = book.key.split('/')[2]; + // used to remove the book let index = userBooks.favorites.findIndex( item => item.key.includes(olid)); + // Prototype Method to genereate HTML for each book Object.getPrototypeOf(book).createHTML = function() { + // create info for search result this.html = `

${this.title}

${this.author_name}

`; - // create a modal for each result - this.modal = `