ya_telegram_bot 0.1.0 → 0.1.1
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 +24 -1
- data/lib/{telegram_bot → ya_telegram_bot}/base.rb +1 -1
- data/lib/{telegram_bot → ya_telegram_bot}/exceptions.rb +1 -1
- data/lib/ya_telegram_bot/version.rb +3 -0
- data/lib/ya_telegram_bot.rb +8 -0
- data/{telegram_bot.gemspec → ya_telegram_bot.gemspec} +4 -3
- metadata +8 -8
- data/lib/telegram_bot/version.rb +0 -3
- data/lib/telegram_bot.rb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33d0b778d491d225fe59fadff14f620515b9ef71
|
4
|
+
data.tar.gz: 1a840811af1f7f8c687c02e8a6d93ed0dc3a6232
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce566672deef931074d949515b584e2cf6613266efd7bf7f4da0df9ed1cc8383a6a1e8f897b189a936afa787a44b34b4f3ce336d5b1dcfe2ed50d20e9313caa0
|
7
|
+
data.tar.gz: 7fea81894b8587ac5796a548173fee2ff2e1552f5f59b17977e765a277e1ad26c6e994da4a8683c18752ce82a0ff88022d2ba2f99f45abba3edfe80453257aff
|
data/README.md
CHANGED
@@ -1,7 +1,30 @@
|
|
1
|
-
#
|
1
|
+
# Yet Another Telegram Bot
|
2
2
|
|
3
3
|
**IN DEV**
|
4
4
|
|
5
|
+
## Usage
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
require 'ya_telegram_bot'
|
9
|
+
|
10
|
+
class Bot
|
11
|
+
extend YATelegramBot::Base
|
12
|
+
|
13
|
+
token YOUR_TOKEN
|
14
|
+
end
|
15
|
+
|
16
|
+
updates = Bot.updates
|
17
|
+
updates.each do |message|
|
18
|
+
chat_id = message['chat']['id']
|
19
|
+
user = message['from']['first_name']
|
20
|
+
text = "Hello, *#{user}*"
|
21
|
+
|
22
|
+
Bot.send_message chat: chat_id,
|
23
|
+
text: text,
|
24
|
+
markdown: true
|
25
|
+
end
|
26
|
+
```
|
27
|
+
|
5
28
|
## Contributing
|
6
29
|
|
7
30
|
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/telegram_bot. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
@@ -1,15 +1,16 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require '
|
4
|
+
require 'ya_telegram_bot/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'ya_telegram_bot'
|
8
|
-
spec.version =
|
8
|
+
spec.version = YATelegramBot::VERSION
|
9
9
|
spec.authors = ['Dmitriy Non']
|
10
10
|
spec.email = ['non.dmitriy@gmail.com']
|
11
11
|
|
12
|
-
spec.summary = '
|
12
|
+
spec.summary = 'Yet Another Telegram Bot'
|
13
|
+
spec.description = 'Module for using Telegram Bot API'
|
13
14
|
spec.homepage = ''
|
14
15
|
spec.license = 'MIT'
|
15
16
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ya_telegram_bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitriy Non
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '1.8'
|
83
|
-
description:
|
83
|
+
description: Module for using Telegram Bot API
|
84
84
|
email:
|
85
85
|
- non.dmitriy@gmail.com
|
86
86
|
executables: []
|
@@ -96,11 +96,11 @@ files:
|
|
96
96
|
- LICENSE.txt
|
97
97
|
- README.md
|
98
98
|
- Rakefile
|
99
|
-
- lib/
|
100
|
-
- lib/
|
101
|
-
- lib/
|
102
|
-
- lib/
|
103
|
-
-
|
99
|
+
- lib/ya_telegram_bot.rb
|
100
|
+
- lib/ya_telegram_bot/base.rb
|
101
|
+
- lib/ya_telegram_bot/exceptions.rb
|
102
|
+
- lib/ya_telegram_bot/version.rb
|
103
|
+
- ya_telegram_bot.gemspec
|
104
104
|
homepage: ''
|
105
105
|
licenses:
|
106
106
|
- MIT
|
@@ -124,6 +124,6 @@ rubyforge_project:
|
|
124
124
|
rubygems_version: 2.4.6
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
|
-
summary:
|
127
|
+
summary: Yet Another Telegram Bot
|
128
128
|
test_files: []
|
129
129
|
has_rdoc:
|
data/lib/telegram_bot/version.rb
DELETED