/Second-Capstone-project

This project utilizes 'tvmaze' API to fetch data and show cards, along with another API to retrieve and update likes and comments.

Primary LanguageJavaScriptMIT LicenseMIT

logo

Nextview


Second Capstone project

πŸ“— Table of Contents

πŸ“– [Second Capstone project]

[Second Capstone project] is a Html , Css & javascript based project

πŸ›  Built With

1- HTML. 2- CSS. 3- Javascript. 4- webpack.

Tech Stack

Client

Key Features

  • Webpack used
  • APIs used
  • Live update like and comments

(back to top)

πŸš€ Live Demo

πŸŽ‰ see live

(back to top)

πŸ’» Getting Started

To get a local copy up and running, follow these steps.

Prerequisites

  1. Web browser
  2. Code editor.
  3. git-smc.

Setup

Clone this repository to your desired folder:

Run this command:

  cd my-project
  git clone git@github.com:ankitt26/Second-Capstone-project.git

Install

Install this project with:

Example command:

  cd my-project
  npm install

--->

Usage

To run the project, execute the following command:

cd my-project
npm run start

API Key Generation

To fetch movies and show data use this API πŸ”—

`https://api.tvmaze.com/shows`

To fetch Likes and comments data use this API πŸ”—

`https://us-central1-involvement-api.cloudfunctions.net/capstoneApi/`

Endpoints

/apps/

Allowed actions:

  • POST to create a new app

Parameters:

  • No parameters required

Return value: unique identifier for the app

abc234

➑️ /apps/:app_id/likes/

Allowed actions:

  • POST to create a new like for the given item
  • GET to get a list of items with its respective likes

Parameters for POST action:

URL parameters:

  • app_id: unique identifier of the app (mandatory)

Request body: a JSON object with the key: item_id (mandatory)

Example of request body:

{
    "item_id": "item1"
}

URL example: /apps/abc234/likes

Return value for POST action: 201 status (created)

Parameters for GET action:

URL parameters:

  • app_id: unique identifier of the app (mandatory)

URL example: /apps/abc234/likes

Return value for GET action: array of objects

[
    {
        "likes": 5,
        "item_id": "item1"
    }
]

➑️ /apps/:app_id/comments

Allowed actions:

  • POST to create a new comment for the given item
  • GET to get a list of items with its respective comments

Parameters for POST action:

URL parameters:

  • app_id: unique identifier of the app (mandatory)

Request body: a JSON object with the following keys: item_id, username, comment (mandatory)

Example of request body:

{
    "item_id": "item1",
    "username": "Jane",
    "comment": "Hello"
}

URL example: /apps/abc234/comments

Return value for POST action: 201 status (created)

Parameters for GET action:

URL parameters:

  • app_id: unique identifier of the app (mandatory)

Query parameters:

  • item_id: unique identifier of the item (mandatory)

URL example: /apps/abc234/comments?item_id=item1

Return value for GET action: array of objects

[
    {
        "comment": "This is nice!",
        "creation_date": "2021-01-10",
        "username": "John"
    },
    {
        "comment": "Great content!",
        "creation_date": "2021-02-10",
        "username": "Jane"
    }
]

(back to top)

Run tests

JestπŸ§ͺ

$ npm run test

Deployment

$ npm run build
$ npm start

(back to top)

πŸ‘₯ Authors

πŸ‘€ Ankit

(back to top)

🀝 Contributors

πŸ‘€ Kelvin

(back to top)

πŸ”­ Future Features

  • reservation popup
  • Display TV shows

(back to top)

🀝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(back to top)

⭐️ Show your support

If you like this project give it a star.

(back to top)

πŸ™ Acknowledgments

I would like to thanks microverse .

(back to top)

πŸ“ License

This project is MIT licensed.

(back to top)