Shields: Reddit subreddit subscribers badge

Created on 9 Mar 2019  路  12Comments  路  Source: badges/shields

:clipboard: Description

Which service is this badge for e.g: GitHub, Travis CI

Reddit

What sort of information should this badge show?
Provide an example in plain text e.g: "version | v1.01" or as a static badge
(static badge generator can be found at https://shields.io)

Subreddit subscribers count badge like :

:link: Data

Is there a public API?

Here : https://www.reddit.com/r/Portapps/about.json (replace _Portapps_ with another subreddit)

Does the API requires an API key?

Seems not required

Link to the API documentation.

https://www.reddit.com/dev/api/#GET_r_{subreddit}_about

:microphone: Motivation

Like Twitter badge, display subscribers count for a subreddit :)
I have already worked on previous badges, I can work on it if you want ;)

good first issue service-badge

Most helpful comment

Guys, today I'm starting with this issue. I have an initial question: should we allow the user to change the color o use the reddit's color? Thanks!

All 12 comments

I have already worked on previous badges, I can work on it if you want ;)

Awesome!

Just adding a quick note that you can also create this badge with the dynamic-json badge:
https://img.shields.io/badge/dynamic/json.svg?label=r/Portapps%20subscribers&query=$.data.subscribers&url=https://www.reddit.com/r/Portapps/about.json

But i think this could be a good addition to add to shields.

Guys, today I'm starting with this issue. I have an initial question: should we allow the user to change the color o use the reddit's color? Thanks!

Hey @JosepBernad thanks for starting working on it! I use @RedSparr0w badge on this repo with Reddit's color and I think we should stick on this one.

Thanks @crazy-max! That's my very first issue so maybe I will need some help!

I don't know exactly how to do it, but I've created a new branch in my fork in order to show you my progress.
Am I doing the workflow correctly?

That's the last commit where I've just pushed what I've done. I'm a little bit stuck because I don't know how to solve the issues.

I've been using other services in order to learn how it works.

3443 is ready to merge to add this badge, but there is one item we'd like to get your thoughts on @crazy-max as the OP of this issue.

3443 will add the badge using our social badge style, so the badges will look like:

instead of the badge style discussed above:

I think the social style is a better fit considering, but what are your thoughts?

@calebcartwright We can do both using styles arg no ?

Thanks @crazy-max - I was thinking more about the fact that the _default_ style is different, but yes you should still be able to override the style. I also believe that the fact that default style is social means that the links are embedded into the badge image itself (which I believe still holds true even if you change the style).

@calebcartwright Yes indeed we could use the same implementation as twitter for example.

Thanks @crazy-max! I'll go ahead and merge

Closed in https://github.com/badges/shields/commit/d685cde52bd26070bccdf50cc555dfcb9118f130

It should be deployed in a few days, but anyone interested can track the deployment status here

Was this page helpful?
0 / 5 - 0 ratings

Related issues

najeeb-ur-rehman picture najeeb-ur-rehman  路  3Comments

calebcartwright picture calebcartwright  路  3Comments

PyvesB picture PyvesB  路  3Comments

irgolic picture irgolic  路  3Comments

Turnerj picture Turnerj  路  3Comments