Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.
/ telex Public archive

Telegram low-level API library for LFE

License

Notifications You must be signed in to change notification settings

arpunk/telex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

telex

Telex exposes a very thin abstraction for dealing with all the boilerplate needed for interacting with the Telegram Bot API.

It does not offer any kind of data abstractions over the API responses. This means you need to craft your payload according to the official Telegram API documentation.

Installation

{deps, [telex]}.

Usage

Get the bot details

(telex:request "bot:token" "getMe")

#(ok
  #M(#"username" #"bot_bot" #"is_bot" true #"id" 123456789
     #"first_name" #"BotBot"))

Sending a message

(telex:request "bot:token" "sendMessage" #M(chat_id 123456789 text "hola mundo"))

#(ok
  #M(#"text" #"hello world" #"message_id" 86
     #"from"
     #M(#"username" #"bot_bot" #"is_bot" true
        #"id" 525399965 #"first_name" #"BotBot")
     #"date" 1517968605
     #"chat"
     #M(#"username" #"username" #"type" #"private"
        #"last_name" #"First" #"id" 123456789
        #"first_name" #"Last")))

References

License

Copyright (c) 2018 Ricardo Lanziano

This work is free. You can redistribute it and/or modify it under the terms of the MIT License. See the LICENSE file for more details.

About

Telegram low-level API library for LFE

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published