Skip to content

DhruvTheDev1/Leetcode-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 

Repository files navigation

LeetCode API

The API for retrieving your Leetcode Solved Questions stats

image

About

Leetcode - the worlds leading platform for for coding and algorithmic problems.

I discovered that there are not many APIs that allow you to enter a username and see your Leetcode Stats and as a Leetcode advocate I decided to tackle this problem.

Technologies Used

  • Springboot backend
  • Thymleaf for the view/front-end
  • GraphQL
  • Postman for testing leetcode's graphql endpoint

https://leetcode.com/graphql - uses Leetcode's GraphQL endpoint to retrieve data

Getting Started

Project Structure

  • LeetcodeApiApplication.java - Entry point of the Spring application
  • LeetcodeController.java - Handles request relating to Leetcode stats and returning the response
  • LeetcodeData.java - Plain old Java objects (holder of the data passed by the Controller to be displayed on a View)
  • LeetcodeService.java - Service class that calls Leetcode's graphQL endpoint, converts data to POJO and returns to controller
  • schema.graphqls - GraphQL schema
  • form.html - Thymleaf template for the view

Further Work

  • Improve front-end UI

About

Get Leetcode Stats

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published