DevelopersPL / DevAAC

DevAAC for TFS 1.0
https://developerspl.github.io/DevAAC
MIT License
29 stars 16 forks source link

Highscores, sort by vocation #28

Open att3 opened 9 years ago

att3 commented 9 years ago

Would be nice to be able to sort players by vocation on highscores.

SkillX = selected skill. To me it seems like it loads it like this: (can't use filter here properly)

Sort players by skillX Fetch 100 players on the list (not more, not "normal" mysql limit)

It will load 100 players, with skillX. But if I want to show 100 players with skillX and vocationX, it will only show the players from the top 100 with the skillX, then it will filter those remaining 100 players with vocationX.

I am trying to load players like this:

Sort players by skillX Fetch 100 players with skillX AND vocationX. "SQL / ZnoteAAC": SELECT * FROM players WHERE skillX = '$scope.selectedSkill' AND vocation = '$scope. vocationX' LIMIT 100;"

I haven't yet 100% understood how the SQL / API things work.

Lastly, I've gotta say that this AAC is absolutely stunning. I've had never used angular / swagger before I tried this AAC, so I am having quite hard time understanding how everything works. But, yeah - I've also gotta say that I've learned a lot during the past week, but there are some basic things I haven't understood yet.

DSpeichert commented 9 years ago

Currently the API does not let you query (filter) by fields other than name. It's only possible to search for players by name. You would have to expand the API.

If you make such a change, we'll be happy to merge it with master.