Skip to content

FullStackBulletin/fullstack-books

Repository files navigation

fullstack books

main ts

A static API to discover inspiring books for ambitious full-stack developers

Usage

The base URL of the API is https://fullStackbulletin.github.io/fullstack-books.

API Documentation is available as OpenAPI specification:

Open API V3


The full-stack books API

Version 1.0.0

A collection of books curated for full-stack developers and aspiring ones. Brought to you by FullStackBulletin

Path Table

Method Path Description
GET /authors/ids.json Retrieve all the ids of the available book authors
GET /authors/all.json Retrieve all the available book authors
GET /authors/stats.json Retrieve stats about the available book authors
GET /authors/{authorId}.json Retrieve the details of a given author
GET /books/ids.json Retrieve all the ids of the available books
GET /books/all.json Retrieve all the available books
GET /books/stats.json Retrieve stats about the available books
GET /books/{bookId}.json Retrieve the details of a given book

Reference Table

Name Path Description
AuthorIDs #/components/schemas/AuthorIDs
Stats #/components/schemas/Stats
Author #/components/schemas/Author
AuthorWithBooks #/components/schemas/AuthorWithBooks
BookIDs #/components/schemas/BookIDs
Book #/components/schemas/Book

Path Details


[GET]/authors/ids.json

  • Summary
    Retrieve all the ids of the available book authors

  • Description
    Retrieve all the ids of the available book authors

Responses

  • 200 OK

application/json

[]

[GET]/authors/all.json

  • Summary
    Retrieve all the available book authors

  • Description
    Retrieve all the available book authors

Responses

  • 200 OK

application/json

{
  name?: string
  slug?: string
  url?: string
}[]

[GET]/authors/stats.json

  • Summary
    Retrieve stats about the available book authors

  • Description
    Retrieve stats about the available book authors

Responses

  • 200 OK

application/json

{
  total?: number
  all?: string
  ids?: string
  urlPrefix?: string
}

[GET]/authors/{authorId}.json

  • Summary
    Retrieve the details of a given author

  • Description
    Retrieve the details of a given author

Responses

  • 200 OK

application/json

{
  name?: string
  slug?: string
  url?: string
  books: {
    slug?: string
    title?: string
    subtitle?: string
    edition?: number
    authors: {
      name?: string
      slug?: string
      url?: string
    }
    cover?: string
    links: {
      amazon_us?: string
      amazon_uk?: string
      free?: string
    }
    description?: string
    url?: string
    descriptionHtml?: string
  }[]
}

[GET]/books/ids.json

  • Summary
    Retrieve all the ids of the available books

  • Description
    Retrieve all the ids of the available books

Responses

  • 200 OK

application/json

[]

[GET]/books/all.json

  • Summary
    Retrieve all the available books

  • Description
    Retrieve all the available books

Responses

  • 200 OK

application/json

{
  slug?: string
  title?: string
  subtitle?: string
  edition?: number
  authors: {
    name?: string
    slug?: string
    url?: string
  }
  cover?: string
  links: {
    amazon_us?: string
    amazon_uk?: string
    free?: string
  }
  description?: string
  url?: string
  descriptionHtml?: string
}[]

[GET]/books/stats.json

  • Summary
    Retrieve stats about the available books

  • Description
    Retrieve stats about the available books

Responses

  • 200 OK

application/json

{
  total?: number
  all?: string
  ids?: string
  urlPrefix?: string
}

[GET]/books/{bookId}.json

  • Summary
    Retrieve the details of a given book

  • Description
    Retrieve the details of a given book

Responses

  • 200 OK

application/json

{
  slug?: string
  title?: string
  subtitle?: string
  edition?: number
  authors: {
    name?: string
    slug?: string
    url?: string
  }
  cover?: string
  links: {
    amazon_us?: string
    amazon_uk?: string
    free?: string
  }
  description?: string
  url?: string
  descriptionHtml?: string
}

References

#/components/schemas/AuthorIDs

[]

#/components/schemas/Stats

{
  total?: number
  all?: string
  ids?: string
  urlPrefix?: string
}

#/components/schemas/Author

{
  name?: string
  slug?: string
  url?: string
}

#/components/schemas/AuthorWithBooks

{
  name?: string
  slug?: string
  url?: string
  books: {
    slug?: string
    title?: string
    subtitle?: string
    edition?: number
    authors: {
      name?: string
      slug?: string
      url?: string
    }
    cover?: string
    links: {
      amazon_us?: string
      amazon_uk?: string
      free?: string
    }
    description?: string
    url?: string
    descriptionHtml?: string
  }[]
}

#/components/schemas/BookIDs

[]

#/components/schemas/Book

{
  slug?: string
  title?: string
  subtitle?: string
  edition?: number
  authors: {
    name?: string
    slug?: string
    url?: string
  }
  cover?: string
  links: {
    amazon_us?: string
    amazon_uk?: string
    free?: string
  }
  description?: string
  url?: string
  descriptionHtml?: string
}

Suggest a book

If you want to suggest a new book here's how you can do that.

  • Fork this repository
  • Edit the file src/books.yml and append the new book at the bottom (make sure to follow the spec by looking at the other books).
  • Make sure to place the cover picture in the src/covers folder and reference it in the cover field of the book. Please follow the naming convention and keep the file size small.
  • Run npm run test && npm run build
  • If all looks good, commit your changes
  • Open a PR against the original repository

Import from Amazon

If the book is available on Amazon, you can use the following command to import the book details:

pnpm run import -- <bookASIN1> <bookASIN2> <bookASIN3> ...

Where <bookASIN1>, <bookASIN2>, <bookASIN3>, etc. are the ASINs of the books you want to import.

For example, if the book URL is https://www.amazon.com/Node-js-Design-Patterns-production-grade-applications/dp/1839214112/, the ASIN is 1839214112, so you can run:

pnpm run import -- 1839214112

This will automatically fetch the book details from Amazon and append them to the src/books.yml file. It will also download the book cover and place it under src/covers/.

Amazon captcha check

Sometimes Amazon might trigger a captcha check if you are not an authenticated user. If you are running the import command and you are getting a captcha check, you can try to run the following command to bypass it:

pnpm run import -- --cookies <cookies> <bookASIN1> <bookASIN2> <bookASIN3> ...

Where <cookies> is a cookie string taken from an authenticated session on Amazon. You can get it by inspecting the cookies in your browser and copying the Cookie header from the request.

Contributing

Everyone is very welcome to contribute to this project. You can contribute just by submitting bugs or suggesting improvements by opening an issue on GitHub.

License

Licensed under MIT License. © Luciano Mammino.