Options
All
  • Public
  • Public/Protected
  • All
Menu

Book controller.

Hierarchy

  • BookController

Index

Constructors

constructor

Methods

editBook

  • editBook(bookID: string, title: string, author: string, description: string, ISBN10: string, ISBN13: string, imageData: string, departmentID: number, courseNumber: number, price: number, conditionID: number, user: NBUser): Promise<NBBook>
  • Edit a book.

    Parameters

    • bookID: string

      The book's ID.

    • title: string

      The book's title.

    • author: string

      The book's author.

    • description: string

      The book's description.

    • ISBN10: string

      The book's ISBN 10.

    • ISBN13: string

      The book's ISBN 13.

    • imageData: string

      The image data for the book.

    • departmentID: number

      The book's department ID.

    • courseNumber: number

      The book's course number.

    • price: number

      The price of the book.

    • conditionID: number

      The book's condition ID.

    • user: NBUser

      The user.

    Returns Promise<NBBook>

    The updated book.

getBook

  • getBook(bookID: string): Promise<NBBook>

getBookOwner

listBook

  • listBook(title: string, author: string, description: string, ISBN10: string, ISBN13: string, imageData: string, departmentID: number, courseNumber: number, price: number, conditionID: number, user: NBUser): Promise<NBBook>
  • List a book.

    Parameters

    • title: string

      The book's title.

    • author: string

      The book's author.

    • description: string

      The description of the book.

    • ISBN10: string

      The book's ISBN 10.

    • ISBN13: string

      The book's ISBN 13.

    • imageData: string

      The image data for the book.

    • departmentID: number

      The book's department ID.

    • courseNumber: number

      The book's course number.

    • price: number

      The price of the book.

    • conditionID: number

      The book's condition ID.

    • user: NBUser

      The user.

    Returns Promise<NBBook>

    The new book.

removeBook

  • removeBook(bookID: string, sold: boolean, user: NBUser): Promise<void>

searchBooks

  • searchBooks(query: string, departmentID: number, courseNumber: number, sortID: number): Promise<NBBook[]>
  • Search for books.

    Parameters

    • query: string

      The query string.

    • departmentID: number

      The department ID.

    • courseNumber: number

      The course number.

    • sortID: number

      The search sort ID.

    Returns Promise<NBBook[]>

    All books matching the search parameters.

Generated using TypeDoc