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

Add support for bountysource.com #289

Closed
lo1tuma opened this issue Oct 26, 2014 · 7 comments
Closed

Add support for bountysource.com #289

lo1tuma opened this issue Oct 26, 2014 · 7 comments

Comments

@lo1tuma
Copy link

lo1tuma commented Oct 26, 2014

It would be awesome if you support bountysoure.com badges.

A badge looks like this:
Bountysource

They have an API it is documented here.

@espadrine
Copy link
Member

Thanks a lot for the information!

I'll try to implement this next week.

@espadrine
Copy link
Member

I am astounded by this API page. Either they stopped supporting it, or it never was, and they published this anyway. The bottom line is that it does not work, and I have no idea how to make it work. The trick isn't to use an Accept: application/json, nor is it to use Accept: application/vnd.bountysource+json (as the RAML definition weirdly suggests).

On the plus side, the badges they provide rely on my own design, which means that the data is embedded in the SVG as text.

@lo1tuma
Copy link
Author

lo1tuma commented Oct 27, 2014

You are right, the API doesn’t behave like it’s documented.
I‘ve used the chrome developer tools to show me how the actual requests work and was able to do some requests with the header Accept: application/vnd.bountysource+json; version=2.

However, I think it is easier to read the data from the svg.

@espadrine
Copy link
Member

Has something changed? Now Mozilla shows no issues, no bounties, nothing.

Thanks for giving me the header that works! Further research showed that they have secret APIs, such as this:

$ curl 'https://api.bountysource.com/teams/mozilla' -H 'Accept: application/vnd.bountysource+json; version=2'
{
  "id": 133,
  "name": "Mozilla",
  "slug": "mozilla",
  "image_url_small": "https://cloudinary-a.akamaihd.net/bountysource/image/upload/d_noaoqqwxegvmulwus0un.png,c_pad,w_100,h_100/e8mqcl3fiikeqgio9lxq.png",
  "image_url_medium": "https://cloudinary-a.akamaihd.net/bountysource/image/upload/d_noaoqqwxegvmulwus0un.png,c_pad,w_200,h_200/e8mqcl3fiikeqgio9lxq.png",
  "image_url_large": "https://cloudinary-a.akamaihd.net/bountysource/image/upload/d_noaoqqwxegvmulwus0un.png,c_pad,w_400,h_400/e8mqcl3fiikeqgio9lxq.png",
  "featured": true,
  "bio": "We're a global community dedicated to making the web better and more open for all. Join us to imagine, build & teach the web's future.",
  "url": "https://www.mozilla.org/",
  "created_at": "2013-09-16T18:08:09.249Z",
  "updated_at": "2014-09-18T20:59:01.060Z",
  "issues_count": 0,
  "updates_count": 0,
  "trackers_count": 5,
  "members_count": 0,
  "backers_count": 1,
  "tagged_count": 3,
  "fundraisers_count": 0,
  "open_bounties_amount": 0,
  "closed_bounties_amount": 0,
  "accepts_public_payins": true,
  "community_can_edit": true
}

I'd prefer working with that than straight up string scraping.

@lo1tuma
Copy link
Author

lo1tuma commented Oct 28, 2014

It seems they renamed the team to Mozilla Core

@espadrine
Copy link
Member

The bug I filed for the faulty API is on their API documentation website, but its last commit dates back from March.

I'm tempted to scrape the SVG; even their frontend is months old.

@espadrine
Copy link
Member

The first thing I can implement according to the developers is team activity.

I'll close this issue with this, more badges will be added as they are implemented by bountysource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants