telerb 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/lib/telerb/version.rb +1 -1
- data/lib/telerb.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4519b1036ef8a6e632bb946ab50bddbeb3720b34c22a2954e0884ac17415bf0c
|
4
|
+
data.tar.gz: dd3819fd1c2c1b4398347feabab1767602d7d23df4f5b7bdf24a2492cded3918
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6553f171ea7896eba3095f98036def67198762bc1b1a7a350386bb3b435e7b90f96001a87fc569b119eb4f3888894a4c76cc1c936634609b4c742b1a46be26a
|
7
|
+
data.tar.gz: a4c7afa38d42eabd4e365a80036fcc2eab5ceb55911086aa40474ffac1a15272a2caeecfa381fc7adaab8fbf07e325f39021b0035665d76a4baac6872432524c
|
data/README.md
CHANGED
@@ -82,6 +82,14 @@ bot.user_info(message)
|
|
82
82
|
|
83
83
|
```
|
84
84
|
|
85
|
+
### Send Location
|
86
|
+
|
87
|
+
```
|
88
|
+
|
89
|
+
bot.location(chat_id, latitude, longitude, message_id)
|
90
|
+
|
91
|
+
```
|
92
|
+
|
85
93
|
## Development
|
86
94
|
|
87
95
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/lib/telerb/version.rb
CHANGED
data/lib/telerb.rb
CHANGED
@@ -85,6 +85,16 @@ module TeleRb
|
|
85
85
|
message["from"]
|
86
86
|
end
|
87
87
|
|
88
|
+
def send_location(chat_id, latitude, longitude, reply_to_message_id = nil)
|
89
|
+
CLIENT.post("#{@base_uri}#{@token}/sendLocation",
|
90
|
+
{ chat_id: chat_id, latitude: latitude, longitude: longitude,
|
91
|
+
reply_to_message_id: reply_to_message_id })
|
92
|
+
"Location Sent with success!"
|
93
|
+
rescue StandardError => e
|
94
|
+
puts "Error when sending Location: #{e.message}"
|
95
|
+
nil
|
96
|
+
end
|
97
|
+
|
88
98
|
private
|
89
99
|
|
90
100
|
def send_media(chat_id, media_path, caption = nil, reply_to_message_id = nil, method, filekey)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: telerb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CodeByAllan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ruby library to interact with the Telegram API and create custom bots.
|
14
14
|
email:
|