/MazeFlix

MazeFlix is an entertainment hub where you can find the latest and your favorite TV shows. You can view the details of the show, like a show or even comment. You can also see other comments which might give you a general idea about what people think about the show. It is built with HTML, CSS and JavaScript with data from the TvMaze API(tv show data) and the Involvement API(likes and comments)

Primary LanguageJavaScriptMIT LicenseMIT

MazeFlix

MazeFlix is an entertainment hub where you can find the latest and your favorite TV shows. You can view the details of the show, like a show or even comment. You can also see other comments which might give you a general idea about what people think about the show. It is built with HTML, CSS and JavaScript with data from the TvMaze API(tv show data) and the Involvement API(likes and comments)

Project Presentation

Presentation Link

Mini Demo

screenshot

Additional description about the project and its features.

Built With

  • Major languages (HTML, CSS, JavaScript)

  • Frameworks (None)

  • Technologies used

    - Webpack(Code Bundlng et al)
    - Jest(for testing)
    - Git(version control)
    - ESLint(JavaScript linting)
    - WebHint(linting tool)
    - Stylelint(style linting)

Live Demo

Website Link

Getting Started

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

Prerequisites

  • A text editor(preferably Visual Studio Code)

Install

Usage

Clone this repository

$ git clone git@github.com:AnselemOdims/MazeFlix.git
$ cd MazeFlix

Run project

$ npm install
$ npm run start # this will make webpack watching for your changes in code
$ npm run test #This is to run the tests on the count method

Open page in browser

$ open dist/index.html

Interaction with the TvMaze API

  • Each new query for TV shows is done with the GET method using the BASEURL
      https://api.tvmaze.com/
    

To get all shows that the title begin with 'a', GET request will be made to the below URL

  https://api.tvmaze.com/search/shows?q=a

Interaction with the Involvement API

  • Each new query for Involvement API is done using the below as the BASEURL

      https://us-central1-involvement-api.cloudfunctions.net/capstoneApi/
    
  • To create a new app, a POST request is made to the API using the endpoint

      /apps/

    This returns the appID

      abc234

    Likes

  • A POST request is made to the API when a user clicks on the like button using this endpoint:

    Endpoint

      /apps/:app_id/likes/

    body parameters

    { 
        "item_id": "item1"
    }

    Return value for POST action: 201 status (created)

  • The GET request returns data in JSON format like this:

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

Comments

  • A POST request is made to the API when a user clicks on the like button using this endpoint:

    Endpoint

      /apps/:app_id/comment/

    body parameters

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

    Return value for POST action: 201 status (created)

  • The GET request returns data in JSON format like this:

    Endpoint

      /apps/abc234/comments?item_id=item1

    It returns

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

Authors

👤 Anselem Odimegwu

👤 Mubarak Ibrahim

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

📝 License

This project is MIT licensed.