Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As API, I provide the possibility to fetch the plays data #24

Open
melpadden opened this issue Mar 25, 2024 · 0 comments
Open

As API, I provide the possibility to fetch the plays data #24

melpadden opened this issue Mar 25, 2024 · 0 comments
Assignees
Labels

Comments

@melpadden
Copy link
Collaborator

The following endpoint should be added:

GET /plays

The endpoint should accept the following filters:

  • player_account_hash
  • round_id

E.g.

GET /plays?player_account_hash=dead...beef

Which implies those properties should be indexed in the plays table.

The endpoint should return a paginated list of Play entities with the following properties:

  • deploy_hash
  • round_id
  • play_id
  • player_account_hash
  • player_public_key
  • prize_amount
  • is_jackpot
  • timestamp

The jackpot data should be calculated over the plays table using a query like the following one which should be provided as findPlays(filters, offset, limit) function in the Play repository.

The player_public_key should be deanonimized from the player_account_hash in the API handler using CSPR.cloud Account API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants