ankitt26 / LeaderBoard

In the leaderboard project, we utilize an API to fetch items and set user data along with their scores.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ankit


LeaderBoard

πŸ“— Table of Contents

πŸ“– [LeaderBoard]

[LeaderBoard] is a Html , Css & javascript based project

πŸ›  Built With

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

Tech Stack

Client

Key Features

  • Webpack used

(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/LeaderBoard.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 make requests to the API use this link πŸ”—

`https://us-central1-js-capstone-backend.cloudfunctions.net/api/games`

Follow the steps below to generate the key:

Endpoints

This project includes the following endpoints:

/games/

Allowed actions:

  • POST: Create a new game

Mandatory parameters for POST action:

  • name: Name of the game

Parameters example for POST action (sent in the body of the request in JSON format):

{
  "name": "Example Game"
}

Return value: unique identifier for the game:

{
	"result": "Game with ID: Zl4d7IVkemOTTVg2fUdz added."
}

/games/:id/scores/

URL parameters:

  • id: unique identifier of the game

URL example: /games/Zl4d7IVkemOTTVg2fUdz/scores/

Allowed actions:

  • POST to create a new score for the given game
  • GET to get a list of scores for the given game

Mandatory parameters for POST action:

  • user: name of the user
  • score: points (number)

Parameters example for POST action (sent in the body of the request in JSON format):

{ 
	"user": "John Doe",
	"score": 42
}

Return value for POST action:

{
	"result""Leaderboard score created correctly."
}

Parameters for GET action: none

Return value for GET action:

{
    "result": [
        {
            "user": "John Doe",
            "score": 42
        },
        {
            "user": "Peter Parker",
            "score": 35
        },
        {
            "user": "Wonder Woman",
            "score": 50
        }
    ]
}

(back to top)

Run tests

coming soon

Deployment

➑️ coming soon...

(back to top)

πŸ‘₯ Authors

πŸ‘€ Ankit

(back to top)

πŸ”­ Future Features

  • Live update leaderboard usong API.
  • You can add score in leaderboard.

(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)

About

In the leaderboard project, we utilize an API to fetch items and set user data along with their scores.

License:MIT License


Languages

Language:JavaScript 50.5%Language:CSS 30.1%Language:HTML 19.4%