I just open-sourced the codebase for the DEV Social Badge that I've been working on. Check it out on GitHub!
DEV Social Badge is an unofficial soc...
For further actions, you may consider blocking this person and/or reporting abuse
Hey, This is super cool! One suggestion: Is there a way to pull reactions as it is (heart, unicorn, and bookmarks seperately) and display them with the icons? It would be more cool. 😊
Sadly, no. The API only offers a sum of all positive reactions - not a breakdown of each.
Ah, got it.
Btw, simply scrape the URL of the post and get the values from HTML.
Ah wait, you have to render the HTML - because it's built on react.
Yes, as this is a client side script I don’t want to scrape anything and rather just rely on the APIs.
I could make a request for the functionality in the API but there’s no guarantee it will be added.
This is really cool!
Thanks, Ben. Glad you like it.
Is there any possibility to get comment count or comments? I looked at one graph and it didn't seem to have a way. I didn't dig any deeper.
In regards to comments, I can pull the comment count and the last comment datetime stamp but not the actual comments. How would you envision those being used? Reaction and Comment counts side by side? or a toggle between the two? Or perhaps something else...?
You can pull the comments from dev.to/api/comments
For example, all comments from this article are dev.to/api/comments?a_id=268819
This comment I just wrote it'll be: dev.to/api/comments/m10o
The documentation is a "bit" behind :D
Thank you. I wasn't aware. Perhaps I will create a separate library for pulling all of the comments.
Not sure, I would really like to embed comments on my site.
As for omment count does it make sense to separate them with a pipe?
reaction | comments
I'll play with it and see what I can come up with.
Ultimately, I'd like to get a few different formatting options in place that can be selected based on how the user wants it shown on their website.
This is soo cool!! 🌻
Nice, Benjamin!