-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* implement Birthdays * Implement Bot API 7.10 * Implement Bot API 7.10 * Implement Bot API 7.10 * update endpoints for 7.10 * linter fix * Implement Bot API 7.11 * tests & changelog * minor fix for consistency * constrains fixed * clean up & constrains min/max/eq fixed & empty classes building * happy linter * Implement Bot API 8.0 * version & changelog * version correction
- Loading branch information
Showing
123 changed files
with
6,325 additions
and
3,476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telegram | ||
module Bot | ||
module Types | ||
## Just for classes consistency | ||
# rubocop:disable Naming/ConstantName | ||
BackgroundFill = ( | ||
BackgroundFillSolid | | ||
BackgroundFillGradient | | ||
BackgroundFillFreeformGradient | ||
) | ||
# rubocop:enable Naming/ConstantName | ||
end | ||
end | ||
end |
12 changes: 12 additions & 0 deletions
12
lib/telegram/bot/types/background_fill_freeform_gradient.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telegram | ||
module Bot | ||
module Types | ||
class BackgroundFillFreeformGradient < Base | ||
attribute :type, Types::String.constrained(eql: 'freeform_gradient').default('freeform_gradient') | ||
attribute :colors, Types::Array.of(Types::Integer) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telegram | ||
module Bot | ||
module Types | ||
class BackgroundFillGradient < Base | ||
attribute :type, Types::String.constrained(eql: 'gradient').default('gradient') | ||
attribute :top_color, Types::Integer | ||
attribute :bottom_color, Types::Integer | ||
attribute :rotation_angle, Types::Integer | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telegram | ||
module Bot | ||
module Types | ||
class BackgroundFillSolid < Base | ||
attribute :type, Types::String.constrained(eql: 'solid').default('solid') | ||
attribute :color, Types::Integer | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telegram | ||
module Bot | ||
module Types | ||
## Just for classes consistency | ||
# rubocop:disable Naming/ConstantName | ||
BackgroundType = ( | ||
BackgroundTypeFill | | ||
BackgroundTypeWallpaper | | ||
BackgroundTypePattern | | ||
BackgroundTypeChatTheme | ||
) | ||
# rubocop:enable Naming/ConstantName | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telegram | ||
module Bot | ||
module Types | ||
class BackgroundTypeChatTheme < Base | ||
attribute :type, Types::String.constrained(eql: 'chat_theme').default('chat_theme') | ||
attribute :theme_name, Types::String | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telegram | ||
module Bot | ||
module Types | ||
class BackgroundTypeFill < Base | ||
attribute :type, Types::String.constrained(eql: 'fill').default('fill') | ||
attribute :fill, BackgroundFill | ||
attribute :dark_theme_dimming, Types::Integer | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telegram | ||
module Bot | ||
module Types | ||
class BackgroundTypePattern < Base | ||
attribute :type, Types::String.constrained(eql: 'pattern').default('pattern') | ||
attribute :document, Document | ||
attribute :fill, BackgroundFill | ||
attribute :intensity, Types::Integer | ||
attribute? :is_inverted, Types::True | ||
attribute? :is_moving, Types::True | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telegram | ||
module Bot | ||
module Types | ||
class BackgroundTypeWallpaper < Base | ||
attribute :type, Types::String.constrained(eql: 'wallpaper').default('wallpaper') | ||
attribute :document, Document | ||
attribute :dark_theme_dimming, Types::Integer | ||
attribute? :is_blurred, Types::True | ||
attribute? :is_moving, Types::True | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telegram | ||
module Bot | ||
module Types | ||
class Birthdate < Base | ||
attribute :day, Types::Integer | ||
attribute :month, Types::Integer | ||
attribute? :year, Types::Integer | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telegram | ||
module Bot | ||
module Types | ||
## Just for classes consistency | ||
# rubocop:disable Naming/ConstantName | ||
BotCommandScope = ( | ||
BotCommandScopeDefault | | ||
BotCommandScopeAllPrivateChats | | ||
BotCommandScopeAllGroupChats | | ||
BotCommandScopeAllChatAdministrators | | ||
BotCommandScopeChat | | ||
BotCommandScopeChatAdministrators | | ||
BotCommandScopeChatMember | ||
) | ||
# rubocop:enable Naming/ConstantName | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telegram | ||
module Bot | ||
module Types | ||
class BusinessConnection < Base | ||
attribute :id, Types::String | ||
attribute :user, User | ||
attribute :user_chat_id, Types::Integer | ||
attribute :date, Types::Integer | ||
attribute :can_reply, Types::Bool | ||
attribute :is_enabled, Types::Bool | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telegram | ||
module Bot | ||
module Types | ||
class BusinessIntro < Base | ||
attribute? :title, Types::String | ||
attribute? :message, Types::String | ||
attribute? :sticker, Sticker | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telegram | ||
module Bot | ||
module Types | ||
class BusinessLocation < Base | ||
attribute :address, Types::String | ||
attribute? :location, Location | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telegram | ||
module Bot | ||
module Types | ||
class BusinessMessagesDeleted < Base | ||
attribute :business_connection_id, Types::String | ||
attribute :chat, Chat | ||
attribute :message_ids, Types::Array.of(Types::Integer) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telegram | ||
module Bot | ||
module Types | ||
class BusinessOpeningHours < Base | ||
attribute :time_zone_name, Types::String | ||
attribute :opening_hours, Types::Array.of(BusinessOpeningHoursInterval) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telegram | ||
module Bot | ||
module Types | ||
class BusinessOpeningHoursInterval < Base | ||
attribute :opening_minute, Types::Integer | ||
attribute :closing_minute, Types::Integer | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.