Author Topic: Update deepbot api for user to include rank and add a user count endpoint  (Read 1491 times)

0 Members and 1 Guest are viewing this topic.

wwsean08

  • Youngling
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
  • Twitch Name: wwsean08
Hello,

So I've been working on some programs to extract user data and store it in a database (in order to create a website for my stream and possibly other streams).  One thing that I find annoying is that I have to do one call to get all the data for a user (api|get_user|:user or api|get_users|:offset|:limit and iterate) and then to get the rank to include it I have to make a second call for each individual user to api|get_rank|:user which when dealing with a bulk export makes it a-lot less efficient.

Another endpoint that would make an operation like this much more efficient would be a way to know how many users are actually in the database, we currently have the api|get_users|:offset|:limit but need to know how many there are to write good loops, if we could make one call and get back that number it would make mine as well as other people using the API to do similar things have a much easier life :)

ExpertsOnline

  • Creator
  • Councilor
  • *****
  • Posts: 2656
  • Karma: +289/-24
    • View Profile
  • Twitch Name: expertsonline
The reason rank is not in the user endpoint is because it is a computed value which can be dependent on hours or points. As that setting changes, the ranks change as well.

As for get_users count, this has been added. The API documentation has been updated in addition to a number of other endpoints.
Please see the latest documentation here: https://github.com/DeepBot-API/client-websocket/blob/master/README.md

wwsean08

  • Youngling
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
  • Twitch Name: wwsean08
Ok that makes sense, and i was using the documentation on the wiki which is why I didn't realize that existed :)

Thanks for the great work/explanation