Skip to content

πŸ“‹ App to retrieve and display book details from the Google books API

License

Notifications You must be signed in to change notification settings

AndrewJBateman/angular-api-booklist

Repository files navigation

⚑ Angular API Booklist

  • Angular with Angular Material app to search for books from the Google Books API
  • Displays initial list of books using predefined list query
  • Allows user to search for books using a query string of 4 or more letters
  • Note: to open web links in a new window use: ctrl+click on link

GitHub repo size GitHub pull requests GitHub Repo stars GitHub last commit

πŸ“„ Table of contents

πŸ“š General info

  • Book search form and search results displayed using mat-cards

πŸ“· Screenshots

  • Example screenshot

πŸ“Ά Technologies

πŸ’Ύ Setup

  • Install dependencies using npm i
  • Run ng serve to get a server at http://localhost:4200/
  • If required, run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

πŸ’» Code Examples

  • extract from google-books.service.ts to retrieve book search items from Google Books API
export class GoogleBookService {
  private API_URL = "https://www.googleapis.com/books/v1/volumes";

  constructor(private http: HttpClient) {}

  findBook(title: string): Observable<Book[]> {
    return this.http
      .get<GoogleBooksApiInterface>(`${this.API_URL}?q=${title}`)
      .pipe(map((data: GoogleBooksApiInterface) => data.items));
  }
}

πŸ†’ Features

  • Google book search API does not require a key
  • Uses *ngFor first and last of list identifiers to change CSS class colors

πŸ“‹ Status & To-Do List

  • Status: Working
  • To-Do: Add book-detail, improve side-nav

πŸ‘ Inspiration

πŸ“ License

  • This project is licensed under the terms of the MIT license.

βœ‰οΈ Contact

About

πŸ“‹ App to retrieve and display book details from the Google books API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •