Skip to content
Compare
Choose a tag to compare
@Trsnaqe Trsnaqe released this 16 Jul 02:22
· 1 commit to main since this release

Updated endpoints, while keeping v1 endpoints usage same for backward compatibility purposes I have added v2 endpoints to have query based urls. Mainly done for title searching, which was suggested by Nama in #2.

This release also has some code cleanup and architectural redesigns. So if you come across a bug please open up a new issue.

new endpoints with query options.

You can test the new version on sample deployment with sample data.

New Endpoints with Query Options

1. Games Endpoint

Endpoint: /api/v2/games
Method: GET

Query Parameters:

  • title: Filter by game title.
  • appid: Filter by app ID (takes precedence over title).
  • precision: Adjust search precision. Default to 1.0 but can be set any float number higher than 0. To change default, see constants.go.

Example Usage:

  • To search games by title:
    /api/v2/games?title=counter-strike
  • To get games with title counter strike and precision 2
    /api/v2/games?title=counter-strike&precision=1
  • To get games by app ID:
    /api/v2/games?appid=12345

2. Reports Endpoint

Endpoint: /api/v2/reports
Method: GET

Query Parameters:

  • versioned: Set to true for versioned data.
  • version: Specify 1 or 2 to filter by version.
  • title: Search by game title.
  • precision: Adjust search precision. Default to 1.0 but can be set any float number higher than 0. To change default, see constants.go.
  • appid: Filter by app ID (takes precedence over title).

Example Usage:

  • To get reports with a title search:
    /api/v2/reports?title=counter-strike
  • To get reports with title counter strike with precision 1
    /api/v2/reports?title=counter-strike&precision=1
  • To get reports for a specific app ID:
    /api/v2/reports?appid=12345
  • To get versioned reports:
    /api/v2/reports?versioned=true
  • To get reports of a specific version:
    /api/v2/reports?version=2

Full Changelog: https://github.com/Trsnaqe/protondb-community-api/commits/V2