This project is my variant of the My Reads project created for Udacity's React course. It is a simple bookshelf management system with its own bookshelf and a possibility to integrate books from a provided API.
How to start the application:
- Navigate to the correct folder
cd starter
- Install all required project dependencies
npm i
- Start the Development Server
npm start
├── CONTRIBUTING.md
├── README.md
├── SEARCH_TERMS.md
├── package.json
├── public
│ ├── favicon.ico
│ └── index.html
├── src
│ ├── App.css
│ ├── App.js
│ ├── Book.js
│ ├── BookShelf.js
│ ├── BookShelfChanger.js
│ ├── BookShelfTray.js
│ ├── SearchBookPage.js
│ ├── icons
│ │ ├── add.svg
│ │ ├── arrow-back.svg
│ │ └── arrow-drop-down.svg
│ ├── index.css
│ ├── index.js
│ └── utils
│ └── BooksAPI.js
└── yarn.lock
The API provided by Udacity contains a small database of books that can be searched and added.
Important
)
There are 4 possible requests to the API:
Method Signature:
get(bookID);
- bookID:
<String>
containing any available bookid
attribute (e.g. "1wy49i-gQjIC") - Returns a Promise which resolves to a JSON object containing a single book object matching the
bookID
.
Method Signature:
getAll();
- Returns a Promise which resolves to a JSON object containing a collection of book objects.
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.
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, so don't be surprised if your searches for Basket Weaving or Bubble Wrap don't come back with any results.
This project was bootstrapped with Create React App. You can find more information on how to perform common tasks here.
This repository was created based on the entry code for all Udacity students.
For details, check out CONTRIBUTING.md.