telegram-bot-ruby 0.3.9 → 0.3.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/telegram/bot/types.rb +1 -1
- data/lib/telegram/bot/types/chat.rb +14 -0
- data/lib/telegram/bot/types/message.rb +1 -11
- data/lib/telegram/bot/version.rb +1 -1
- metadata +3 -3
- data/lib/telegram/bot/types/group_chat.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 968de661bcb24792c23f4175f4c5fb8a81e212d4
|
4
|
+
data.tar.gz: 560ea1d83cd207f0cefbce917abfefed5abb7a1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cddca05d497a882643eb3e724a0c068045da110526722fdef129fb6ec0e2e0bdcb60a22ce33c75f06f7835690138de8b01da93a79059b4c356dcf7028da2270
|
7
|
+
data.tar.gz: 7f15ee25c0e53145b8f76b99daca43b6dfc1c4dd13fe1e82bc5ebd21c3e85b1278de526222ae42ed8ff7a211971c71fefff004bd359e35fd3c2d515eef2234bf
|
data/lib/telegram/bot/types.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'telegram/bot/types/base'
|
2
2
|
require 'telegram/bot/types/user'
|
3
|
-
require 'telegram/bot/types/group_chat'
|
4
3
|
require 'telegram/bot/types/audio'
|
5
4
|
require 'telegram/bot/types/photo_size'
|
6
5
|
require 'telegram/bot/types/document'
|
@@ -9,6 +8,7 @@ require 'telegram/bot/types/video'
|
|
9
8
|
require 'telegram/bot/types/voice'
|
10
9
|
require 'telegram/bot/types/contact'
|
11
10
|
require 'telegram/bot/types/location'
|
11
|
+
require 'telegram/bot/types/chat'
|
12
12
|
require 'telegram/bot/types/message'
|
13
13
|
require 'telegram/bot/types/update'
|
14
14
|
require 'telegram/bot/types/reply_keyboard_markup'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Telegram
|
2
|
+
module Bot
|
3
|
+
module Types
|
4
|
+
class Chat < Base
|
5
|
+
attribute :id, Integer
|
6
|
+
attribute :type, String
|
7
|
+
attribute :title, String
|
8
|
+
attribute :username, String
|
9
|
+
attribute :first_name, String
|
10
|
+
attribute :last_name, String
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -2,8 +2,6 @@ module Telegram
|
|
2
2
|
module Bot
|
3
3
|
module Types
|
4
4
|
class Message < Base
|
5
|
-
attr_accessor :chat
|
6
|
-
|
7
5
|
attribute :message_id, Integer
|
8
6
|
attribute :from, User
|
9
7
|
attribute :date, Integer
|
@@ -26,15 +24,7 @@ module Telegram
|
|
26
24
|
attribute :new_chat_photo, Array[PhotoSize]
|
27
25
|
attribute :delete_chat_photo, Boolean
|
28
26
|
attribute :group_chat_created, Boolean
|
29
|
-
|
30
|
-
def chat=(value)
|
31
|
-
@chat =
|
32
|
-
if value.key?('first_name')
|
33
|
-
User.new(value)
|
34
|
-
elsif value.key?('title')
|
35
|
-
GroupChat.new(value)
|
36
|
-
end
|
37
|
-
end
|
27
|
+
attribute :chat, Chat
|
38
28
|
end
|
39
29
|
end
|
40
30
|
end
|
data/lib/telegram/bot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: telegram-bot-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Tipugin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httmultiparty
|
@@ -136,11 +136,11 @@ files:
|
|
136
136
|
- lib/telegram/bot/types.rb
|
137
137
|
- lib/telegram/bot/types/audio.rb
|
138
138
|
- lib/telegram/bot/types/base.rb
|
139
|
+
- lib/telegram/bot/types/chat.rb
|
139
140
|
- lib/telegram/bot/types/contact.rb
|
140
141
|
- lib/telegram/bot/types/document.rb
|
141
142
|
- lib/telegram/bot/types/file.rb
|
142
143
|
- lib/telegram/bot/types/force_reply.rb
|
143
|
-
- lib/telegram/bot/types/group_chat.rb
|
144
144
|
- lib/telegram/bot/types/location.rb
|
145
145
|
- lib/telegram/bot/types/message.rb
|
146
146
|
- lib/telegram/bot/types/photo_size.rb
|