Need a proper API for Codewars clans (feature request) #2710
Replies: 4 comments 9 replies
-
This is a duplicate of #760. There are more open feature requests related to clans, and we haven't done anything. The main problem is, there's no such thing as a clan. It's just a text field that simply triggers users with the same value to follow each other on change. That said, this one doesn't require modeling anything, so I'm considering to hack something together quickly to stop the leaderboard DDoS :D
|
Beta Was this translation helpful? Give feedback.
-
Oh! You haven't deployed the API yet! I'm rooting for it so that I can add that leaderboard back to my portfolio, thank you! |
Beta Was this translation helpful? Give feedback.
-
Just deployed it. It's type Response = {
totalPages: number,
totalItems: number,
data: Member[], // ordered by descending honor points
};
type Member = {
id: string,
username: string,
honor: number, // honor points
score: number, // rank score
rank: number, // -8 to -1 are kyu, 1+ are dan
languages: {score: number, rank: number}[],
}; Specify the page with Example: https://www.codewars.com/api/v1/clans/Codewars/members I'll see how this performs and make any adjustments. I didn't realize you guys had a weird clan name like that 🤦♂️ That won't work because of slash and period. https://www.codewars.com/api/v1/clans/100devs/members is unrelated? |
Beta Was this translation helpful? Give feedback.
-
@khanhtranngoccva Like I wrote above, CORS has been enabled from the beginning, but it's having trouble because of the slash in the name (it's configured with https://github.com/cyu/rack-cors). I don't have the time to look into this further. I can change the clan name to something else if you'd like. |
Beta Was this translation helpful? Give feedback.
-
There is no proper API to get a clan member's user information from the clan name yet in the v1 API. I and another folk at #100devs independently created live leaderboards for the #100devs clan, but since this kind of API does not exist, we both had to procure a list of following from a fellow user's social tab (and capture them using browser console JavaScript) and make thousands of HTTP requests to your API (not good).
I'd appreciate a new API that accepts a clan name and return the information of every user in it.
Beta Was this translation helpful? Give feedback.
All reactions