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

Add player/records endpoint #1839

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Add player/records endpoint #1839

wants to merge 12 commits into from

Conversation

builder-247
Copy link
Member

@builder-247 builder-247 commented Jan 28, 2019

This is to allow creating records overview on web, similar to dotabuff:
image

TODO:

  • Add caching
  • Add rest of the fields to spec.js

@builder-247
Copy link
Member Author

Maybe each record should contain the full match object?

@builder-247 builder-247 changed the title Add player/records enpoint Add player/records endpoint Jan 29, 2019
store/queries.js Outdated Show resolved Hide resolved
@@ -451,6 +455,29 @@ function getMatchRankTier(match, cb) {
});
}

function getPlayerRecords(player, cb) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is going to have to be cached in some way. . . otherwise this one call is making 20+ calls to the database

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps I should only call the getPlayerMatches function once and then sort the data from there? Or do you have other ideas how this should be handled?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that might be more efficient.

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

Successfully merging this pull request may close these issues.

2 participants