Methods

The Vote System API provides a set of functions allowing developers to engage with voting data: Documentation: API Methods Usage


1. GetPoints_API

Purpose: Retrieves the total number of points for a player based on both their Steam ID and display name.

Parameters:

  • playerId: The unique ID of the player.

Usage:

int totalPoints = GetPoints_API(playerId);

Details:

  • The method first searches for the player using the provided playerId.

  • If the player is not found, it returns -1.

  • It then fetches the player's data using both their Steam ID and display name.

  • The total points are the sum of votes from both data sets.


2. GetPoints_ForSite_API

Purpose: Retrieves the number of points for a player from a specific ranking site, based on both their Steam ID and display name.

Parameters:

  • playerId: The unique ID of the player.

  • site: The ranking site's name.

Usage:

int sitePoints = GetPoints_ForSite_API(playerId, "exampleSite");

Details:

  • The method first searches for the player using the provided playerId.

  • If the player is not found, it returns -1.

  • It then fetches the player's data using both their Steam ID and display name.

  • The points are the sum of votes from the specified site from both data sets.


3. GetMultiplicator_ForSite_API

Purpose: Retrieves the point multiplier for a specific ranking site.

Parameters:

  • site: The ranking site's name.

Usage:

int multiplicator = GetMultiplicator_ForSite_API("exampleSite");

Details:

  • The method checks if the provided site exists in the configuration.

  • If the site is not found, it returns -1.

  • Otherwise, it returns the point multiplier for the specified site.


4. GetTimeRoutine_ForSite_API

Purpose: Retrieves the time interval for checking the API of a specific ranking site.

Parameters:

  • site: The ranking site's name.

Usage:

int timeRoutine = GetTimeRoutine_ForSite_API("exampleSite");

Details:

  • The method checks if the provided site exists in the configuration.

  • If the site is not found, it returns -1.

  • Otherwise, it returns the time interval for checking the site's API.


This documentation provides a clear understanding of the API methods. For further questions or clarifications, please refer to the main documentation or contact support.

Last updated