Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Badge request: Patreon #3585

Open
eritbh opened this issue Jun 18, 2019 · 12 comments
Open

Badge request: Patreon #3585

eritbh opened this issue Jun 18, 2019 · 12 comments
Labels
service-badge Accepted and actionable changes, features, and bugs

Comments

@eritbh
Copy link
Contributor

eritbh commented Jun 18, 2019

📋 Description

I'd like Patreon badges that can display the number of patrons a creator has or the amount of money pledged to the creator per month. For example:

monthly patrons | 3
receiving | $5/mo

(I based these examples loosely on the existing funding badges, but the specific format isn't solid.)

🔗 Data

Patreon has a REST API. At the moment, it appears it requires OAuth to access. There is a post on the Patreon Developers forum about the possibility of including a way to access read-only data about a creator (including patron count and monthly earnings) without authentication. I assume that this issue would be blocked on such an unauthenticated API being created.

🎤 Motivation

I'd like to promote my Patreon creator page on my repositories as a way of obtaining funding.

@eritbh eritbh added the service-badge Accepted and actionable changes, features, and bugs label Jun 18, 2019
@calebcartwright calebcartwright added the needs-upstream-help Not actionable without help from a service provider label Jun 18, 2019
@calebcartwright
Copy link
Member

Thanks @Geo1088, sounds like a good idea!

You are correct that we won't be able to add support for Patreon to Shields until such time as there as an available endpoint on the Patreon side that provides the relevant data points.

An API that requires clients to authenticate isn't necessarily a blocker, depending on the circumstances. There are a handful of other services that Shields integrates with that require authentication, but the auth isn't scoped to a specific user/project/etc. so we just have to create an account in that service for Shields. Another potential solution would be if the service was willing to provide Shields with some kind of appropriately scoped read-only token that we could use to authenticate with the service's APIs.

For now though I've added the needs-upstream-help label. Please let us know if/when an API becomes available!

@calebcartwright
Copy link
Member

calebcartwright commented Jun 18, 2019

We've also had others leverage our Endpoint Badge feature to create badges with Patreon data

See #2838 (comment) for more info

@eritbh
Copy link
Contributor Author

eritbh commented Jun 18, 2019

I'll keep tabs on the Patreon dev forum and see if there are any plans to create a readonly API. I don't believe the existing OAuth API supports getting information on other users' profiles, so that wouldn't actually be an option at all.

If Patreon doesn't add support for this use-case, could this project consider including an HTML scraping solution like the one you linked, or is that kind of thing discouraged since it can change at any time?

@calebcartwright
Copy link
Member

If Patreon doesn't add support for this use-case, could this project consider including an HTML scraping solution like the one you linked, or is that kind of thing discouraged since it can change at any time?

We won't do HTML scraping directly within Shields for a variety of reasons.

The comment I linked above was from a user that leveraged our Endpoint Badge to create Patreon badges. The Endpoint Badge in short, allows developers to create their own API endpoints that can be used from Shields as long as the API response conforms to the documented schema.

How developers choose to implement their services for use with the Endpoint Badge is entirely up to them.

@eritbh
Copy link
Contributor Author

eritbh commented Jun 18, 2019

That's about what I was expecting, so if Patreon doesn't give an API for the information themselves then there's nothing Shields can do to support it. Makes sense.

Will keep this issue updated with any response from the Patreon devs.

@paulmelnikow paulmelnikow changed the title Patreon badge Badge request: Patreon Sep 15, 2019
@eritbh
Copy link
Contributor Author

eritbh commented Sep 23, 2019

As an update: A Patreon developer responded back on July 2nd saying that they're considering the feature for their roadmap. I don't see any public roadmap from them so I guess we're still waiting for something to be implemented or not.

@calebcartwright
Copy link
Member

Thanks for letting us know @Geo1088!

@amkayondo
Copy link

Finally found a Patreon budge 🎶🎉🎉

Patreon donate button

read more here https://github.com/bevry/badges/

@NatoBoram
Copy link

NatoBoram commented Sep 8, 2020

Patreon seems to provide a public API right now.

Testing on Kurzgesagt's ID 73401 and the query data.attributes.patron_count on the url https://www.patreon.com/api/campaigns/73401, I get this :

Patreons

URL is https://img.shields.io/badge/dynamic/json?color=%23e85b46&label=Patreon&query=data.attributes.patron_count&suffix=%20patrons&url=https%3A%2F%2Fwww.patreon.com%2Fapi%2Fcampaigns%2F73401.

@eritbh
Copy link
Contributor Author

eritbh commented Sep 9, 2020

Neat, thanks for the info!

It seems like Patreon's API is in a bit of a weird spot - they appear to have stopped providing official support for it, but it's not clear to me what that means for its stability going forwards. I'll probably be using the endpoint solution you posted for now though.

@NatoBoram
Copy link

Yeah, they have some pages with server-side rendering and some other pages that are done correctly. I don't exactly know why or how this happened, but anyway, this API is used by them.

@chris48s
Copy link
Member

chris48s commented Sep 9, 2020

Patreon does provide a documented public API: https://docs.patreon.com/#introduction
It looks like we do need to authenticate but no rate limits are mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge Accepted and actionable changes, features, and bugs
Projects
None yet
Development

No branches or pull requests

5 participants