Superseded by the official Exercism API v3.
Instructions to create a badge are still valid, just replace the data url
with https://exercism.org/api/v2/profiles/<user>/solutions
(append ?criteria=&track_slug=<language>
if you want to filter by programming language), e.g. https://exercism.org/api/v2/profiles/cascandaliato/solutions?criteria=&track_slug=go
.
A super simple scraper of Exercism user profiles that can be used to create badges like the one above (instructions here).
- Right now it retrieves only the number of published solutions from the user profile page
https://exercism.io/profiles/<user>
. - It consists of a single endpoint published at
https://exercism-stats-scraper.netlify.app/api/solutions
. - The endpoint accepts
GET
requests and requires auser
param which must be a valid Exercism user, e.g. https://exercism-stats-scraper.netlify.app/api/solutions?user=casca. - It returns a JSON object with the
total
number of published solutions:or, if an error occurred:{ "total": number }
{ "error": string }
- Head to Shields.io.
- Fill the form for the
Dynamic
badge:- data type:
json
- data url:
https://exercism-stats-scraper.netlify.app/api/solutions?user=<user>
(replace<user>
with your Exercism user) - query:
total
- specify the badge label (e.g.
solutions
)
- data type:
- Hit the Make Badge button.
- Use the resulting image URL to publish your badge.
- Optionally, you can add the Exercism logo to your badge by appending
&logo=exercism&logoColor=white
to the image URL.