Closed kx-chen closed 6 years ago
@stellargo Thanks for the review.
I changed the commit message but then changed it back after looking at coala.io/commit. According to the page, messages should be written in "imperative present tense". ("add" NOT "adding" or "added"). I think what it is currently should be fine. (unless I understood the page wrong)
For more detail, you should add test info in tests/test_data.yml
involving invalid username, taken username, and available username.
Add support for profile pictures and username checking for gravatar.
Closes https://github.com/manu-chroma/username-availability-checker/issues/37
Gravatar does not have their images as normal
img
tags, instead it has it as background pictures in ana
tag. As a result, I have to parse for thehref
of thea
tag, instead of thesrc
of theimg
tag. Please advise if there is a better way to implement this.Another method that I tried to use was directly getting the profile picture url through Gravatar's json api. (ex: https://en.gravatar.com/kaiusesthis.json). I tried to do that by adding a
keys
key in thewebsites.yml
file. However, this caused more headache down the road as this meant the link on the frontend would go to the json endpoint. Additionally, the regex that parsed thekeys
value did not work properly. It would return the wrong json.Would love to hear feedback on how to make this better.