Skip to content

echowaiwai/books-tracking

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

图书跟踪,单页web应用

图书跟踪应用项目 - Books Tracking

本页索引

快速运行

https://github.com/vernonn/books-tracking

立即查看运行:

  • 在github上下载并解压此项目 或 将此项目clone你选择的路径下。
  • 在项目的根目录下,执行 npm install 下载项目依赖(可打开package.JSON文件查看所需模块)。
  • 同样,在项目的根目录下,执行 npm start,如果没有自动打开,请在网址栏输入http://localhost:3000/

项目文件

├──CONTRIBUTING.md
├──README.md  
├──SEARCH_TERMS.md
├──package.json
├──public
│  ├──favicon.ico
│  └──index.html
└──src
    ├──App.css
    ├──App.js
    ├──App.test.js
    ├──BooksAPI.js
    ├──Book.js
    ├──BookShelf.js
    ├──HeaderPart.js
    ├──SearchPage.js
    ├──icons
    │  ├──add.svg
    │  ├──arrow-back.svg
    │  └──arrow-drop-down.svg
    ├──index.css
    └──index.js

BooksAPI英文文档

BooksAPI.js

getAll

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.

update

Method Signature:

update(book, shelf)
  • book: <Object> containing at minimum an id 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

search

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. You'll need to make sure that books have the correct state while on the search page.

注意事项

BooksAPI使用一组固定的缓存搜索结果,并限于一组特定的搜索项,可在 SEARCH_TERMS.md 中找到。该列表中的选项是唯一适用于后端的选项,因此,如果搜索Basket Weaving或Bubble Wrap之类的选项,并不会返回任何结果。

About

图书跟踪应用

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 69.1%
  • CSS 21.7%
  • HTML 9.2%