Welcome to the README for the Tennis Players API! This API provides endpoints to manage tennis player data and statistics. Whether you're a tennis enthusiast, a developer, or just curious, this API has you covered. Below, you'll find information on how to set up the API, available endpoints, and more.
Before you start, make sure you have the following installed:
- Node.js: Download and install Node.js
- Git: Download and install Git
-
Clone this repository to your local machine using the following command:
git clone https://github.com/ReivenIV/API_tennis_players.git
-
Navigate to the project directory:
cd tennis-players-api
-
Install the required dependencies using npm:
npm install
-
Create a
.env
file in the root directory of the project:API_PORT=????? API_URL=http://localhost:?????
Adjust the values as needed.
To start the API server, run the following command:
npm start
The API will be accessible at the URL defined in the .env
file (http://localhost:5000
by default).
This API provides endpoints for managing tennis player data and statistics. Below are the available endpoints:
-
Get All Players
- Retrieve a list of all players.
- Method:
GET
- URL:
/api/v1/players/all
-
Get Player by ID
- Retrieve details of a player by their ID.
- Method:
GET
- URL:
/api/v1/players/by_id/:id
-
Get Players by Sex Type
- Retrieve a list of players based on their sex type.
- Method:
GET
- URL:
/api/v1/players/by_sex_type/:sexType
-
Get All Statistics
- Retrieve statistics for all players.
- Method:
GET
- URL:
/api/v1/statistics/all
-
Get Statistics by Sex Type
- Retrieve statistics for players based on their sex type.
- Method:
GET
- URL:
/api/v1/statistics/by_sex_type/:sexType
Please note that you need to replace :id
and :sexType
with appropriate values when making requests.
For more details on request and response formats, refer to the API documentation.
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them with descriptive commit messages.
- Push your changes to your fork.
- Submit a pull request detailing your changes.
Feel free to explore the API endpoints, experiment with player data, and integrate this API into your applications. If you have any questions or need assistance, don't hesitate to reach out. Happy coding! 🎾