roelver / fcctop100 Goto Github PK
View Code? Open in Web Editor NEWAn (unofficial) leaderboard for FreeCodeCamp.com
An (unofficial) leaderboard for FreeCodeCamp.com
When using the suggested API call in the Camper Leaderboard project, the total calculated points for the recent and alltime do not match the API calls for recent by total points and alltime by total points.
When calling http://fcctop100.herokuapp.com/api/fccusers/top/recent
the results were as follows (example):
{"username":"wearenotgroot","img":"https://avatars.githubusercontent.com/u/16578279?v=3","alltime":632,"recent":368,"lastUpdate":"2016-02-28T08:09:15.011Z"}, ...
However, comparing it to the call for recent points by total using http://fcctop100.herokuapp.com/api/fccusers/recent/total
, you get:
{"_id":"56ace0f7a733c603005869e5","username":"wearenotgroot","pointsRecent":389,"challengesRecent":7,"algorithmsRecent":9,"projectsRecent":5,"communityRecent":368,"totalRecent":639,"lastUpdate":"2016-02-28T08:09:15.011Z","img":"https://avatars.githubusercontent.com/u/16578279?v=3"},..
Notice that the totalRecent
key is 389 in the latter call, whereas recent
is 368 in the former. It looks like the top/recent
is only pulling the community points and not the total.
In this example, the suggested http://fcctop100.herokuapp.com/api/fccusers/top/recent
call yields the user wearenotgroot as the 2nd highest in recent points. But if we check that users recent ranking using http://fcctop100.herokuapp.com/api/fccusers/ranking-r/wearenotgroot
it yields
{"_id":"56ace0f7a733c603005869e5","username":"wearenotgroot","existing":true,"points":942,"challenges":260,"algorithms":42,"projects":8,"community":632,"total":1342,"pointsRecent":389,"challengesRecent":7,"algorithmsRecent":9,"projectsRecent":5,"communityRecent":368,"totalRecent":639,"lastUpdate":"2016-02-28T08:09:15.011Z","__v":0,"img":"https://avatars.githubusercontent.com/u/16578279?v=3","following":[],"ranking":28}
This shows the actual rank as 28, which matches the users position when calling http://fcctop100.herokuapp.com/api/fccusers/top/recent
.
Similar seeming errors occur when using the alltime calls.
I'm not sure if this is intentional, but I wanted to point it out in case it is a bug.
Suggested API call http://fcctop100.herokuapp.com/api/fccusers/top/recent
Alternate API call http://fcctop100.herokuapp.com/api/fccusers/recent/total
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.