Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 1.72 KB

File metadata and controls

41 lines (32 loc) · 1.72 KB

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