5

On Linux, for my resume, using LuaLaTex, I would like to automatically update the score I have on SO.

Is there some public API to query the 195K point score and the 0.05% overall I have on June 2020?

It seems that the type of user objects is relevant.

1
  • This is the best you can do: https://api.stackexchange.com/2.2/users/841108?order=desc&sort=reputation&site=stackoverflow&filter=!)scTwI3i00OtODDTSG5u. Total reputation is not available in the API. You could do a SEDE query but that one is hard to automate as it lacks a proper API
    – rene
    Jun 15, 2020 at 9:40

1 Answer 1

5

That is not available from the API. At best you get your own reputation:

/2.2/users/841108?order=desc&sort=reputation&site=stackoverflow&filter=!LnNkvsiMoAuboSNHiWK3fq

{
  "reputation_change_year": 5880,
  "reputation_change_quarter": 3570,
  "reputation_change_month": 1007,
  "reputation_change_week": 29,
  "reputation_change_day": 30,
  "reputation": 195027,
  "user_id": 841108,
  "link": "https://stackoverflow.com/users/841108/basile-starynkevitch",
  "display_name": "Basile Starynkevitch"
}

but there is no other endpoint that returns your position in relation to other users.

An alternative is this SEDE query but that is not easy to automate as SEDE lacks a proper API. You have to script that.

;with league as 
(
select rank() over (order by reputation desc) [ranking]
     , id
     , reputation
from users where reputation > 199
)
select ranking
, ranking / convert(decimal,(select count(*) from league )) *100
from league
where id = ##userid?841108:int##

This is the result today:

ranking 298 / percentage 0.048187478904117

SEDE is updated on Sunday.

3
  • 1
    If logged in could potentially use stackoverflow.com/reputation as well Jun 15, 2020 at 10:44
  • @Nick at the end that does show totals for week, month quarter, year but not your position overall. Am I missing something or is that hidden in that stream of data that I didn't notice.
    – rene
    Jun 15, 2020 at 10:49
  • 1
    Sorry, I meant for the reputation total, position would still have to come from SEDE Jun 15, 2020 at 10:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .