GithubHelp home page GithubHelp logo

vns0 / telegram-notification-golang Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 2.0 8 KB

This project was created to maximize the ease of raising the service to send notifications to the people you choose. The project will develop and complement as desired, inspiration and opportunity.

License: MIT License

Go 100.00%
telegram-go go golang golang-telegram golang-notification go-notify go-telegram-bot-api go-telegram-api telegram-go-bot sender-notification-telegram

telegram-notification-golang's Introduction

telegram-notification-goLang

This project was created to quickly raise the service of notifications in telegrams. Every time I started making a project, I needed to raise the server of logs, notifications and other things, if the server of logs - I did it a long time ago, then notifications - you can study in this repo. Everything is simple, there is no complex code, it is important to raise the API and start using

Instruction:

1. Change .env.example to .env 
    1.1 telegram_id= # U telegram bot id
    1.2 port=8080 # port for start API
2. Insert you token and port to .env file
3. Insert you Ids chat to send to data.json

The API has two parameters, one is required, the other is not. Mandatory - message, optional - this is the IDs of the chats, if there are none, then it will take from the data.son, if there is, it will take from the body from request.

Curl Example:

curl -XPOST -H "Content-type: application/json" -d '{"message" : "test Message" }' 'http://localhost:8080/notify/send'

response: {"Success": true, "Message": "Message sended"}

curl -XPOST -H "Content-type: application/json" -d '{"message" : "test Message", "Ids" : ["696300339"] }' 'http://localhost:8080/notify/send'

response: {"Success": true, "Message": "Message sended"}

API

http://localhost:8080/notify/send 
Params: {
    message string,
    Ids? [] string
}
!message => response status 400

author:

Name:          Nikita
Company:       SmartWorld
Position:      TeamLead
Mail:          [email protected]
TG:            @nikitavoryet
Year of birth: 1999
FullStack:     JS/GO

In the plans :

- [ ] Docker
- [ ] Use DB for IDs chat
- [ ] CRUD Ids chat
- [ ] Role-based access

License

MIT

Free Software, Hell Yeah!

telegram-notification-golang's People

Contributors

vns0 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

hostystack

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.