The project builds upon my personal leetcode problems practice history, and reflect it in simple html page.
This project is initiated because I want to learn more about RESTful API and programming language Go. At the same time, I want to keep track of my leetcode change record by rendering data in simple html file and visualize my progress :)
The data is stored in JSON format. Below is the example:
record = {
"ID": 47,
"number": 122,
"title": "String Manupulation",
"difficulty": "easy",
"date": "2022-01-10",
"comment": "It was so easy!"
}
- ID: This is an unique identifier that represents the problem
- number: This is a problem number that you can see in leetcode website
- title: This is a problem title that you can see in leetcode website
- difficulty: This represents problem level. (Easy, Medium, Hard)
- date: This is a date of my problem completion
- comment: Any comments on this problem
curl -i http://localhost:9000/api/v1/problems/
curl --header "Content-Type: application/json" --request GET http://localhost:9000/api/v1/problems/{id}
curl --header "Content-Type: application/json" --request POST http://localhost:9000/api/v1/problems/
curl --header "Content-Type: application/json" --request DEKETE http://localhost:9000/api/v1/problems/{id}
http://localhost:9000/api/v1/about
will take you to the table with the history of leetcode problems you solved.
- MySQL, all my config is stored in config directory - app.go
git clone https://github.com/YutaUtah/LeetCodeAPI.git
go mod download
cd cmd
go run main.go