4

我目前想开发一个网页来显示我在 Stack Exchange 中的成就。

只是基本信息......获得的徽章和声誉。

我是 Javascript 的初学者。我简要回顾了 Javascript SDK,但似乎无法通过介绍。显然,要访问信息,我需要一个访问令牌来加载“/我”网址。

这是 api 的链接:https ://api.stackexchange.com/docs/js-lib

我对此采取了正确的方法吗?我需要加载的只是获得的声誉和徽章。并在每次刷新页面时重新加载这些值。

4

1 回答 1

2

感谢LJ_1102,问题解决了……

这是我需要的网址:https ://api.stackexchange.com/users/2086142?site=stackoverflow

哪个返回

{"items": [{"badge_counts":{"bronze":20,"silver":4,"gold":1}, "account_id":2384980, "is_employee":false, "last_modified_date":1418916218, "last_access_date":1418916810, "reputation_change_year":314, "reputation_change_quarter":189, "reputation_change_month":17, "reputation_change_week":12, "reputation_change_day":12, "reputation":658, "creation_date":1361259689, "user_type":"registered", "user_id":2086142, "age":23, "accept_rate":53, "location":"Petaluma, CA", "website_url":"", "link":"http://stackoverflow.com/users/2086142/jsetting32", "display_name":"jsetting32", "profile_image":"http://i.stack.imgur.com/dPs0T.jpg?s=128&g=1"}], "has_more":false,"quota_max":300,"quota_remaining":279}

badge_counts哪里的钥匙reputation是我需要的!

于 2014-12-18T15:37:17.053 回答