GET /reviews

This returns a list of all reviews made

Endpoint URL

http://127.0.0.1:8080/api/reviews

Example code

const loadReviews = async () => {
    try {
        const response = await fetch("/api/reviews");
        const reviews = await response.json();
        return reviews;
    } catch (error) {
        console.error("Error fetching reviews data:", error);
        throw error;
    }
};

Example response

[
    {
        "rating": 0.6,
        "id": 1,
        "title": "Unlocking Android",
        "text": "Android is an open source mobile phone platform based on the Linux operating system and developed by the Open Handset Alliance, a consortium of over 30 hardware, software and telecom companies that focus on open standards for mobile devices. Led by search giant, Google, Android is designed to deliver a better and more open and cost effective mobile experience.    Unlocking Android: A Developer's Guide provides concise, hands-on instruction for the Android operating system and development tools. This book teaches important architectural concepts in a straightforward writing style and builds on this with practical and useful examples throughout. Based on his mobile development experience and his deep knowledge of the arcane Android technical documentation, the author conveys the know-how you need to develop practical applications that build upon or replace any of Androids features, however small.    Unlocking Android: A Developer's Guide prepares the reader to embrace the platform in easy-to-understand language and builds on this foundation with re-usable Java code examples. It is ideal for corporate and hobbyists alike who have an interest, or a mandate, to deliver software functionality for cell phones.    WHAT'S INSIDE:        * Android's place in the market      * Using the Eclipse environment for Android development      * The Intents - how and why they are used      * Application classes:            o Activity            o Service            o IntentReceiver       * User interface design      * Using the ContentProvider to manage data      * Persisting data with the SQLite database      * Networking examples      * Telephony applications      * Notification methods      * OpenGL, animation & multimedia      * Sample Applications  ",
        "reviewer": "Erin Foster"
    },
    {
        "rating": 2.1,
        "id": 2,
        "title": "Android in Action, Second Edition",
        "text": "When it comes to mobile apps, Android can do almost anything   and with this book, so can you! Android runs on mobile devices ranging from smart phones to tablets to countless special-purpose gadgets. It's the broadest mobile platform available.    Android in Action, Second Edition is a comprehensive tutorial for Android developers. Taking you far beyond \"Hello Android,\" this fast-paced book puts you in the driver's seat as you learn important architectural concepts and implementation strategies. You'll master the SDK, build WebKit apps using HTML 5, and even learn to extend or replace Android's built-in features by building useful and intriguing examples. ",
        "reviewer": "Deanna Sandoval"
},......

Response fields

Name
Type
Description

rating

float

A float value rounded to 1 decimal place that rates the book, out of 5 stars

id

integer

The unique id of the review

bookId

integer

A unique identifier, all reviews about the same book will have the same bookId, and can be differentiated using the author property

title

string

The title of the book that is being reviewed

text

string

The review text that the user has written

reviewer

string

The name of the user who posted this review

Last updated