This project is part of my Udacity React course.
It creates a simple frontend in React for users to categorize their books into the following "shelves":
- Currently Reading
- Want to Read
- Read
Users can also search books to add to a shelf. Search functionality is limited. The backend API uses a fixed set of cached search results and is limited to a particular set of search terms, which can be found in SEARCH_TERMS.md. That list of terms are the only terms that will work with the backend
To get started developing right away:
- install all project dependencies with
npm install
- start the development server with
npm start
This project uses a backend server provided by Udacity. The file BooksAPI.js
contains the methods used to perform necessary operations on the backend:
Method Signature:
getAll();
- Returns a Promise which resolves to a JSON object containing a collection of book objects.
- This collection represents the books currently in the bookshelves in your app.
Method Signature:
update(book, shelf);
- book:
<Object>
containing at minimum anid
attribute - shelf:
<String>
contains one of ["wantToRead", "currentlyReading", "read"] - Returns a Promise which resolves to a JSON object containing the response data of the POST request
Method Signature:
search(query);
- query:
<String>
- Returns a Promise which resolves to a JSON object containing a collection of a maximum of 20 book objects.
- These books do not know which shelf they are on. They are raw results only. To provide the user with which shelf a searched book is in, the results from this response are cross-referenced with our current bookshelf state.