Boxing Data API - Explore Weight Classes with the Divisions Endpoint
Divisions represent the various weight categories in which boxers compete. Common examples include Heavyweight, Middleweight, and Featherweight. Each division has a specific maximum weight limit.
The Boxing Data API provides access to information about these divisions, including:
- Division names: Easily identify different weight classes.
- Maximum weight limits: Understand the weight restrictions for each division (in both pounds and kilograms).
- Filtering capabilities: Filter fights and fighters by division ID for targeted results.
Exploring the Divisions Endpoint
The Divisions endpoint provides access to detailed information about weight classes within the Boxing Data API. There are two primary functionalities offered by this endpoint:
1. List All Available Divisions:
- Endpoint URL:
https://boxing-data-api.p.rapidapi.com/v1/divisions/
- Description: This request retrieves a complete list of all supported weight classes.
- Response: The API returns an array of objects, each representing a division. Each object includes the division’s name, maximum weight limits in pounds and kilograms, and a unique identifier.
2. Get Details of a Specific Division:
- Endpoint URL:
https://boxing-data-api.p.rapidapi.com/v1/divisions/<division_id>
(replace<division_id>
with the specific ID you want) - Description: By providing a specific division ID, you can retrieve detailed information about that particular weight class.
- Response: The API returns an object containing all information associated with the requested division, including its name, weight limits, and ID.
Utilizing the Divisions Endpoint in Your Code
Here are some code examples demonstrating how to interact with the Divisions endpoint using various programming languages:
List all divisions
Example response:
Get specific division
Example response:
Remember to replace [Your RapidAPI Key]
with your actual RapidAPI key in your code.
By leveraging the Divisions endpoint, you can effectively incorporate weight class data into your applications. This empowers you to:
* Filter fights and fighters based on weight class.
* Display weight class information alongside boxer profiles.
* Analyze trends and statistics within specific weight divisions.