Implement the 'Read' functionality with endpoints to get a list of all resources and a single resource by its ID.
The 'Read' operation is fundamental to any API, as it allows clients to retrieve data. In a RESTful API, this is typically handled by two separate endpoints using the `GET` HTTP method. The first endpoint is for retrieving the entire collection of a resource. For our books API, this would be `GET /books`. This endpoint should query our data store (the in-memory list) and return an array of all book objects. The second endpoint is for retrieving a single, specific resource by its unique identifier. The convention is to use a path parameter in the URI, such as `GET /books/{book_id}`. This endpoint will receive the `book_id` as an argument. Its logic will then search the data store for a book with a matching ID. If the book is found, it is returned to the client with a `200 OK` status code. If no book with that ID exists, it's crucial to return a `404 Not Found` status code. This clear distinction between a successful response with data and a 'not found' error is a key aspect of a well-designed API. Implementing these two `GET` endpoints provides the essential functionality for clients to query and view the data managed by the API.