Coder Social home page Coder Social logo

cp-rating-api's Introduction

Competitive Rating API

An API endpoint to get competitive programming profiles and ratings from various platforms.

Current Platforms

- Codechef 
- Codeforces
- LeetCode

API Endpoints

Base URL- https://cp-rating-api.vercel.app/

Available endpoints

  • /codechef/[username]

    Response-
    {
    "username": [username],
    "avatar": [profile-image],
    "rating": [rating],
    "stars": [stars],
    "country": [country],
    "globalRank": [global rank],
    "countryRank": [country rank],
    "puzzleRating": [puzzle rating],
    "onevsoneRating": [1v1 rating],
    "participation": [no of contests],
    "color": [rating color],
    "problemsSolved": [completely solved problems],
    "partialProblems": [partially solved problems],
    "contests": [ - Array of all contests participated-  ]
    }
    
  • /codeforces/[username]

    Response-
    {
    "rating": [current rating],
    "titlePhoto": [photoURL],
    "rank": [current rank],
    "handle": [username],
    "maxRating": [max_rating],
    "color": [rank color],
    "friends": [no of friends],
    "contributions": [contributions]
    }
    
  • /leetcode/[username]

    Response-
    {
    "user": [username],
    "rank": [ranking],
    "avatar": [avatar-url],
    "problemsSolved": [no of problems solved],
    "languages": [
        {
        "languageName": [language],
        "problemsSolved": [no of problems]
        }
    ],
    "totalProblems": [current total problems on leetcode],
    "submissions": [
        {
        "difficulty": "All",
        "count": [no of problems],
        "submissions": [total submissions]
        },
        {
        "difficulty": "Easy",
        "count": [no of problems],
        "submissions": [total submissions]
        },
        {
        "difficulty": "Medium",
        "count": [no of problems],
        "submissions": [total submissions]
        },
        {
        "difficulty": "Hard",
        "count": [no of problems],
        "submissions": [total submissions]
        }
    ]
    "topics": {
        "advanced":[
        [-array of topics with tagName and problemsSolved-]
        ]
        "intermediate":[
        [-array of topics with tagName and problemsSolved-]
        ]
        "fundamental":[
        [-array of topics with tagName and problemsSolved-]
        ]
    }
    }
    

To get shields.io badges with your rating, use these examples-

  • Codechef

    ![Codechef badge](https://img.shields.io/endpoint?style=for-the-badge&url=https%3A%2F%2Fcp-rating-api.vercel.app%2Fbadge%2Fcodechef%2F[USERNAME]&cacheSeconds=86400)
    

    Replace [USERNAME] with codeforces username.

  • Codeforces

    ![Codeforces badge](https://img.shields.io/endpoint?style=for-the-badge&url=https%3A%2F%2Fcp-rating-api.vercel.app%2Fbadge%2Fcodeforces%2F[USERNAME]&cacheSeconds=86400)
    

    Replace [USERNAME] with codeforces username.

  • Leetcode

    ![Leetcode badge](https://img.shields.io/endpoint?style=for-the-badge&url=https%3A%2F%2Fcp-rating-api.vercel.app%2Fbadge%2Fleetcode%2F[USERNAME]&cacheSeconds=86400)
    

    Replace [USERNAME] with leetcode username.

cp-rating-api's People

Contributors

lemondrop847 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.