So today I decided to continue refining my JavaScript skills (different post over on [Code Review SE][1] if you'd like to review the results) and utilized the Stack Exchange API (v2.2) to write a "user flair" replica.

In case you don't know what the flair that SE provides is:

<a href="https://stackexchange.com/users/13342919"><img src="https://stackexchange.com/users/flair/13342919.png" width="208" height="58" alt="profile for PerpetualJ on Stack Exchange, a network of free, community-driven Q&amp;A sites" title="profile for PerpetualJ on Stack Exchange, a network of free, community-driven Q&amp;A sites"></a>

The process was a little tedious in places, but only because I am still learning the concept of callbacks in JavaScript. Overall though, I believe they turned out pretty decent (only two shown here).

[![Wheel][2]][2] [![Box][4]][4]

This got me thinking, in my testing I had to make several separate calls to get all of the information I needed to replicate the flair, but used two primary methods:

 - [users/{ids}][5]
 - [users/{ids}/associated][6]

Do the future plans for the API include a "user flair" call that would give all of the following information for building custom user flair cards:

 - Most Common Display Name or First Encountered
- I say most common or first encountered because your display name can be different on each SE network.
 - Total Reputation
 - Total Number of Badges (Gold, Silver, and Bronze)
 - Link to SE Network Profile
 - SE Network Profile Image URL
- This is because your profile image can be different on each SE network.
- Could use the display name here for the above to prevent the multiple networks since all users have to set their SE Network profile to match an existing sub-site, so could be considered the preferred account information.
 - Top 10 Sites (or as many as possible up to this)
- Ordered by reputation descending.
- Reputation per site.
- Badge Counts per site (Gold, Silver, and Bronze)
- Link to Profile on Site

My biggest concern is that it would be underutilized and eventually fall out of support. Perhaps this is why it doesn't exist already?


  [1]: https://codereview.stackexchange.com/questions/228876/is-it-difficult-to-follow-or-understand-my-javascript-with-my-usage-of-callbacks
  [2]: https://i.sstatic.net/7Ho3H.jpg
  [3]: https://i.sstatic.net/0k1Qy.jpg
  [4]: https://i.sstatic.net/ux7Hw.jpg
  [5]: https://api.stackexchange.com/docs/users-by-ids
  [6]: https://api.stackexchange.com/docs/associated-users