botbot-leetcode

command module
v0.0.0-...-5d21454 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 2 Imported by: 0

README

BotBot LeetCode Daily Challenge Notifier

BotBot LeetCode Daily Challenge Notifier is a simple automated bot designed to fetch daily coding challenges from LeetCode and send notifications with the challenge details. Currently, it supports notifications via Telegram.

Features

  • Fetches the daily coding challenge from LeetCode.
  • Formats messages appropriately for different platforms (now is only for Telegram).
  • Sends formatted challenge details directly as a personal message.

Getting Started

Prerequisites
  • Go 1.18 or later.
  • An active LeetCode API endpoint that provides daily challenges.
  • A Telegram bot token and chat ID for sending messages through Telegram.
Installation
  1. Clone the Repository

    git clone https://github.com/phuonganhniie/botbot-leetcode.git
    
    cd botbot-leetcode
    
  2. Configure the Application

    Copy the sample configuration file and modify it according to your needs. The config file must be named config.env.

    Edit config/config.env with your details:

    LEETCODE_DAILY_URL: "https://example.com/api/leetcode_challenge"
    
    TELEGRAM_BOT_TOKEN: "12xxx:ABC-DExxxxhIkl-zyx57W2xxxxx3ew11"
    
  • About the LeetCode URL: I used the alfa-leetcode-api for getting the well-structured LeetCode's data. Special thanks to alfaarghya for contributing helpful APIs.
Usage

Run the application to start fetching and sending the daily LeetCode challenge:

go run main.go

The application is set up with a cron job that triggers at 10:00 AM daily to perform these tasks automatically by AWS Lambda & AWS EventBridge.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
api

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL