Skip to content
This repository was archived by the owner on Apr 2, 2023. It is now read-only.

cascandaliato/exercism-stats-scraper

Repository files navigation

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.


Exercism Stats Scraper · Netlify Exercism statistics

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 a user 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:
    {
      "total": number
    }
    
    or, if an error occurred:
    {
      "error": string
    }
    

Create a Badge

  1. Head to Shields.io.
  2. 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)
  3. Hit the Make Badge button.
  4. Use the resulting image URL to publish your badge.
  5. Optionally, you can add the Exercism logo to your badge by appending &logo=exercism&logoColor=white to the image URL.

About

Public API to create badges for Exercism.io user profiles.

Topics

Resources

License

Stars

Watchers

Forks