telegram-bot-ruby 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d046ea037180601b34ed180c84dba650f0895146fc2da272ed653f3b99e1f69a
4
- data.tar.gz: 90640f6115c64d59d2339276943a8f21a33f28a57a59f5ef47b8483e55d50fc4
3
+ metadata.gz: b317a72c70d47e641cfa44e30533dc58ee35d18981188ea2b356ea1e90fb28d5
4
+ data.tar.gz: ea5b139c49a72f05cbea49846ddbba946441c21cc691298d25683a2da256730e
5
5
  SHA512:
6
- metadata.gz: 9d3f79d0e0dd88dc7728140c343aee1a4e8dfccff98f42d3f4f6aae10a6850fe01a0901534896b4ad9d42241c90ecf3df7bc3f240b6d5a8550fd5c8c727896fa
7
- data.tar.gz: dd1f7711db2e9b434a7ad992bdd3b131d3c06e7b48309714c9ec6819b142916e7e1e06e5edd55b79460be7984a6c7bc0b7158529a863f6f4258808bb6e665be1
6
+ metadata.gz: d1e78d1c39c2171e3fa039f3cedf3c9d0a3b28fde13f8d4d07e927c8c2ca17251bacd3c7ede5009e016399ef45ebbdadc8fa70476756a75955eab76c151168e8
7
+ data.tar.gz: 55fed893d8410399b38457bf07ee942dddd41a6d322e2c5bd643c9b001a5297060886b401b138bcc0b4d0e121fdc2492077f322ff5e8c083a5c62eca4254cbba
@@ -1,6 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.0
3
+ - 2.6.5
4
+ - 2.7.0
4
5
  script:
5
6
  - bundle exec rubocop
6
7
  - bundle exec rspec
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.12.0
4
+
5
+ - Implement [Bot API 4.5](https://core.telegram.org/bots/api-changelog#december-31-2019) and [Bot API 4.6](https://core.telegram.org/bots/api-changelog#january-23-2020)
6
+
3
7
  ## 0.11.0
4
8
 
5
9
  - Implement [Bot API 4.4](https://core.telegram.org/bots/api#july-29-2019)
@@ -18,6 +18,7 @@ module Telegram
18
18
  sendInvoice answerShippingQuery answerPreCheckoutQuery
19
19
  sendGame setGameScore getGameHighScores setPassportDataErrors
20
20
  editMessageMedia sendAnimation sendPoll stopPoll setChatPermissions
21
+ setChatAdministratorCustomTitle
21
22
  ).freeze
22
23
  REPLY_MARKUP_TYPES = [
23
24
  Telegram::Bot::Types::ReplyKeyboardMarkup,
@@ -37,7 +37,7 @@ module Telegram
37
37
  log_incoming_message(message)
38
38
  yield message
39
39
  end
40
- rescue Faraday::Error::TimeoutError
40
+ rescue Faraday::TimeoutError
41
41
  retry
42
42
  end
43
43
 
@@ -26,6 +26,7 @@ require 'telegram/bot/types/shipping_address'
26
26
  require 'telegram/bot/types/order_info'
27
27
  require 'telegram/bot/types/successful_payment'
28
28
  require 'telegram/bot/types/poll_option'
29
+ require 'telegram/bot/types/poll_answer'
29
30
  require 'telegram/bot/types/poll'
30
31
  require 'telegram/bot/types/passport_file'
31
32
  require 'telegram/bot/types/encrypted_passport_element'
@@ -75,6 +76,7 @@ require 'telegram/bot/types/callback_query'
75
76
  require 'telegram/bot/types/shipping_query'
76
77
  require 'telegram/bot/types/pre_checkout_query'
77
78
  require 'telegram/bot/types/update'
79
+ require 'telegram/bot/types/keyboard_button_poll_type'
78
80
  require 'telegram/bot/types/keyboard_button'
79
81
  require 'telegram/bot/types/reply_keyboard_markup'
80
82
  require 'telegram/bot/types/reply_keyboard_remove'
@@ -3,6 +3,10 @@ module Telegram
3
3
  module Types
4
4
  class Animation < Base
5
5
  attribute :file_id, String
6
+ attribute :file_unique_id, String
7
+ attribute :width, Integer
8
+ attribute :height, Integer
9
+ attribute :duration, Integer
6
10
  attribute :thumb, PhotoSize
7
11
  attribute :file_name, String
8
12
  attribute :mime_type, String
@@ -3,6 +3,7 @@ module Telegram
3
3
  module Types
4
4
  class Audio < Base
5
5
  attribute :file_id, String
6
+ attribute :file_unique_id, String
6
7
  attribute :duration, Integer
7
8
  attribute :performer, String
8
9
  attribute :title, String
@@ -17,6 +17,9 @@ module Telegram
17
17
  attribute :invite_link, String
18
18
  attribute :pinned_message, 'Telegram::Bot::Types::Message'
19
19
  attribute :permissions, ChatPermissions
20
+ attribute :slow_mode_delay, Integer
21
+ attribute :sticker_set_name, String
22
+ attribute :can_set_sticker_set, Boolean
20
23
  end
21
24
  end
22
25
  end
@@ -4,6 +4,7 @@ module Telegram
4
4
  class ChatMember < Base
5
5
  attribute :user, User
6
6
  attribute :status, String
7
+ attribute :custom_title, String
7
8
  attribute :until_date, Integer
8
9
  attribute :can_be_edited, Boolean
9
10
  attribute :can_post_messages, Boolean
@@ -3,7 +3,9 @@ module Telegram
3
3
  module Types
4
4
  class ChatPhoto < Base
5
5
  attribute :small_file_id, String
6
+ attribute :small_file_unique_id, String
6
7
  attribute :big_file_id, String
8
+ attribute :big_file_unique_id, String
7
9
  end
8
10
  end
9
11
  end
@@ -3,6 +3,7 @@ module Telegram
3
3
  module Types
4
4
  class Document < Base
5
5
  attribute :file_id, String
6
+ attribute :file_unique_id, String
6
7
  attribute :thumb, PhotoSize
7
8
  attribute :file_name, String
8
9
  attribute :mime_type, String
@@ -3,6 +3,7 @@ module Telegram
3
3
  module Types
4
4
  class File < Base
5
5
  attribute :file_id, String
6
+ attribute :file_unique_id, String
6
7
  attribute :file_size, Integer
7
8
  attribute :file_path, String
8
9
  end
@@ -5,6 +5,7 @@ module Telegram
5
5
  attribute :text, String
6
6
  attribute :request_contact, Boolean
7
7
  attribute :request_location, Boolean
8
+ attribute :request_poll, KeyboardButtonPollType
8
9
  end
9
10
  end
10
11
  end
@@ -0,0 +1,9 @@
1
+ module Telegram
2
+ module Bot
3
+ module Types
4
+ class KeyboardButtonPollType < Base
5
+ attribute :type, String
6
+ end
7
+ end
8
+ end
9
+ end
@@ -7,6 +7,7 @@ module Telegram
7
7
  attribute :length, Integer
8
8
  attribute :url, String
9
9
  attribute :user, User
10
+ attribute :language, String
10
11
  end
11
12
  end
12
13
  end
@@ -3,6 +3,7 @@ module Telegram
3
3
  module Types
4
4
  class PassportFile < Base
5
5
  attribute :file_id, String
6
+ attribute :file_unique_id, String
6
7
  attribute :file_size, Integer
7
8
  attribute :file_date, Integer
8
9
  end
@@ -3,6 +3,7 @@ module Telegram
3
3
  module Types
4
4
  class PhotoSize < Base
5
5
  attribute :file_id, String
6
+ attribute :file_unique_id, String
6
7
  attribute :width, Integer
7
8
  attribute :height, Integer
8
9
  attribute :file_size, Integer
@@ -5,7 +5,12 @@ module Telegram
5
5
  attribute :id, String
6
6
  attribute :question, String
7
7
  attribute :options, Array[PollOption]
8
+ attribute :total_voter_count, Integer
8
9
  attribute :is_closed, Boolean
10
+ attribute :is_anonymous, Boolean
11
+ attribute :type, String
12
+ attribute :allows_multiple_answers, Boolean
13
+ attribute :correct_option_id, Integer
9
14
  end
10
15
  end
11
16
  end
@@ -0,0 +1,11 @@
1
+ module Telegram
2
+ module Bot
3
+ module Types
4
+ class PollAnswer < Base
5
+ attribute :poll_id, String
6
+ attribute :user, User
7
+ attribute :option_ids, Array[Integer]
8
+ end
9
+ end
10
+ end
11
+ end
@@ -3,6 +3,7 @@ module Telegram
3
3
  module Types
4
4
  class Sticker < Base
5
5
  attribute :file_id, String
6
+ attribute :file_unique_id, String
6
7
  attribute :width, Integer
7
8
  attribute :height, Integer
8
9
  attribute :is_animated, Boolean
@@ -13,6 +13,7 @@ module Telegram
13
13
  attribute :shipping_query, ShippingQuery
14
14
  attribute :pre_checkout_query, PreCheckoutQuery
15
15
  attribute :poll, Poll
16
+ attribute :poll_answer, PollAnswer
16
17
 
17
18
  def current_message
18
19
  @current_message ||=
@@ -8,6 +8,9 @@ module Telegram
8
8
  attribute :last_name, String
9
9
  attribute :username, String
10
10
  attribute :language_code, String
11
+ attribute :can_join_groups, Boolean
12
+ attribute :can_read_all_group_messages, Boolean
13
+ attribute :supports_inline_queries, Boolean
11
14
  end
12
15
  end
13
16
  end
@@ -3,6 +3,7 @@ module Telegram
3
3
  module Types
4
4
  class Video < Base
5
5
  attribute :file_id, String
6
+ attribute :file_unique_id, String
6
7
  attribute :width, Integer
7
8
  attribute :height, Integer
8
9
  attribute :duration, Integer
@@ -3,6 +3,7 @@ module Telegram
3
3
  module Types
4
4
  class VideoNote < Base
5
5
  attribute :file_id, String
6
+ attribute :file_unique_id, String
6
7
  attribute :length, Integer
7
8
  attribute :duration, Integer
8
9
  attribute :thumb, PhotoSize
@@ -3,6 +3,7 @@ module Telegram
3
3
  module Types
4
4
  class Voice < Base
5
5
  attribute :file_id, String
6
+ attribute :file_unique_id, String
6
7
  attribute :duration, Integer
7
8
  attribute :mime_type, String
8
9
  attribute :file_size, Integer
@@ -1,5 +1,5 @@
1
1
  module Telegram
2
2
  module Bot
3
- VERSION = '0.11.0'.freeze
3
+ VERSION = '0.12.0'.freeze
4
4
  end
5
5
  end
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.add_dependency 'virtus'
22
22
  spec.add_dependency 'inflecto'
23
23
 
24
- spec.add_development_dependency 'rake', '~> 10.0'
24
+ spec.add_development_dependency 'rake', '~> 13.0'
25
25
  spec.add_development_dependency 'pry'
26
26
  spec.add_development_dependency 'rubocop', '~> 0.48.1'
27
27
  spec.add_development_dependency 'rspec', '~> 3.4'
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.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Tipugin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-30 00:00:00.000000000 Z
11
+ date: 2020-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: '13.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: '13.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -205,6 +205,7 @@ files:
205
205
  - lib/telegram/bot/types/input_venue_message_content.rb
206
206
  - lib/telegram/bot/types/invoice.rb
207
207
  - lib/telegram/bot/types/keyboard_button.rb
208
+ - lib/telegram/bot/types/keyboard_button_poll_type.rb
208
209
  - lib/telegram/bot/types/labeled_price.rb
209
210
  - lib/telegram/bot/types/location.rb
210
211
  - lib/telegram/bot/types/login_url.rb
@@ -225,6 +226,7 @@ files:
225
226
  - lib/telegram/bot/types/passport_file.rb
226
227
  - lib/telegram/bot/types/photo_size.rb
227
228
  - lib/telegram/bot/types/poll.rb
229
+ - lib/telegram/bot/types/poll_answer.rb
228
230
  - lib/telegram/bot/types/poll_option.rb
229
231
  - lib/telegram/bot/types/pre_checkout_query.rb
230
232
  - lib/telegram/bot/types/reply_keyboard_markup.rb
@@ -262,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
262
264
  - !ruby/object:Gem::Version
263
265
  version: '0'
264
266
  requirements: []
265
- rubygems_version: 3.0.3
267
+ rubygems_version: 3.1.2
266
268
  signing_key:
267
269
  specification_version: 4
268
270
  summary: Ruby wrapper for Telegram's Bot API