telegex alternatives and similar packages
Based on the "Third Party APIs" category.
Alternatively, view telegex alternatives based on common mentions on social networks and blogs.
-
ethereumex
Elixir JSON-RPC client for the Ethereum blockchain 0x063D3d782598744AF1252eBEaf3aA97D990Edf72 -
MongoosePush
MongoosePush is a simple Elixir RESTful service allowing to send push notification via FCM and/or APNS. -
cashier
Cashier is an Elixir library that aims to be an easy to use payment gateway, whilst offering the fault tolerance and scalability benefits of being built on top of Erlang/OTP -
airbrake
An Elixir notifier to the Airbrake/Errbit. System-wide error reporting enriched with the information from Plug and Phoenix channels.
CodeRabbit: AI Code Reviews for Developers
Do you think we are missing an alternative of telegex or a related project?
README
Telegex
This library is a client implementation of the official bot API, without any encapsulation. Original flavor!
A little more cautious ๐
The models and APIs of this library are all constructed by DSL (well-designed macros) and contain complete typespecs.
It fully supports bot API version 4.9 and will continue to support the latest version.
However, there are still some methods that lack testing, so I must remind everyone to be careful. If you encounter a bug, please report it in time.
Webhook support?
If you need webhook mode, please look forward to the 0.2.0 version.
Examples & Help
There are some complete example projects in the examples directory. Their code contains relatively complete comments to teach you how to get updates (receive messages) correctly and add related services to the supervision tree.
Welcome to communicate here: @elixir_telegex
Related libraries
- telegex_marked (Safely use Markdown supported by Telegram)
Installation
Add Telegex to your mix.exs
dependencies:
def deps do
[{:telegex, "~> 0.1.0"}]
end
Run the mix deps.get
command to install.
Configuration
Add your bot token to config/config.exs
, like this:
config :telegex,
token: "<BOT_TOKEN>",
# This is the default and optional, will be passed as options to `HTTPoison.post/4`.
timeout: 1000 * 15,
# This is the default and optional, will be passed as options to `HTTPoison.post/4`.
recv_timeout: 1000 * 10
Usage
Here are some examples of common API calls.
getMe
iex> Telegex.get_me
{:ok,
%Telegex.Model.User{
can_join_groups: true,
can_read_all_group_messages: false,
first_name: "TelegexTest",
id: 1192456069,
is_bot: true,
language_code: nil,
last_name: nil,
supports_inline_queries: false,
username: "telegex_test_bot"
}}
getUpdates
iex> Telegex.get_updates limit: 50
{:ok,
[
%Telegex.Model.Update{
message: %Telegex.Model.Message{
new_chat_photo: nil,
author_signature: nil,
forward_sender_name: nil,
...
},
poll: nil,
poll_answer: nil,
pre_checkout_query: nil,
shipping_query: nil,
update_id: 174059571,
...
}
]}
sendMessage
iex> Telegex.send_message -1001486769003, "Hello Telegex!"
{:ok,
%Telegex.Model.Message{
venue: nil,
chat: %Telegex.Model.Chat{
id: -1001486769003,
title: "Dev test",
type: "supergroup",
...
},
date: 1593272573,
message_id: 4146,
text: "Hello Telegex!",
from: %Telegex.Model.User{can_join_groups: nil, ...},
video_note: nil,
...
}}
For more details, please refer to the documentation and the official page of the Telegram bot API.