telegrammer 0.0.2 → 0.0.3
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d3618d92e021d648b116dc847bc1d92abe78fb07
|
|
4
|
+
data.tar.gz: eb1ac18503e71ba969677914c5a55a5f77ff79df
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5cb7e077fa9cc0c2ed3822de1ccbfd4685ed014db036fec6d7828363f0678d1cb8b05cde5a9c167c9c103a22f3d540c3a209b149b5d8b5b6ce4b94ebbe9e48fc
|
|
7
|
+
data.tar.gz: dc30eebd1849f0daeec50783653d1ddb731885f0fa43081deac9f28580829067f8f9ac06b085ac9f26a2c6d4c71af7d0a4e615ad0212dffc5bd92834e03d062f
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
[](http://badge.fury.io/rb/telegrammer)
|
|
2
|
+
[](https://codeclimate.com/github/mayoral/telegrammer)
|
|
3
|
+
|
|
1
4
|
# Telegrammer
|
|
2
5
|
|
|
3
6
|
Ruby client for the [Telegram's Bot API](https://core.telegram.org/bots/api).
|
|
@@ -24,7 +27,7 @@ All current actions are supported by the gem. Here's an example for each action:
|
|
|
24
27
|
```ruby
|
|
25
28
|
require 'telegrammer'
|
|
26
29
|
|
|
27
|
-
bot =
|
|
30
|
+
bot = Telegrammer::Bot.new('[YOUR TELEGRAM TOKEN]')
|
|
28
31
|
|
|
29
32
|
# GET UPDATES
|
|
30
33
|
# https://core.telegram.org/bots/api/#getupdates
|
|
@@ -53,7 +56,7 @@ reply_markup = Telegrammer::DataTypes::ReplyKeyboardMarkup.new(
|
|
|
53
56
|
# This message will activate a custom keyboard...
|
|
54
57
|
bot.send_message(
|
|
55
58
|
chat_id: 1460713,
|
|
56
|
-
text: "Select an option"
|
|
59
|
+
text: "Select an option",
|
|
57
60
|
reply_markup: reply_markup
|
|
58
61
|
)
|
|
59
62
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
module Telegrammer
|
|
2
2
|
module DataTypes
|
|
3
3
|
class ForceReply < Telegrammer::DataTypes::Base
|
|
4
|
-
attribute :force_reply, Boolean
|
|
5
|
-
attribute :selective, Boolean
|
|
4
|
+
attribute :force_reply, Boolean, default: true
|
|
5
|
+
attribute :selective, Boolean, default: false
|
|
6
6
|
end
|
|
7
7
|
end
|
|
8
8
|
end
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
module Telegrammer
|
|
2
2
|
module DataTypes
|
|
3
3
|
class ReplyKeyboardHide < Telegrammer::DataTypes::Base
|
|
4
|
-
attribute :hide_keyboard, Boolean
|
|
5
|
-
attribute :selective, Boolean
|
|
4
|
+
attribute :hide_keyboard, Boolean, default: true
|
|
5
|
+
attribute :selective, Boolean, default: false
|
|
6
6
|
end
|
|
7
7
|
end
|
|
8
8
|
end
|
|
@@ -2,9 +2,9 @@ module Telegrammer
|
|
|
2
2
|
module DataTypes
|
|
3
3
|
class ReplyKeyboardMarkup < Telegrammer::DataTypes::Base
|
|
4
4
|
attribute :keyboard, Array[Array[String]]
|
|
5
|
-
attribute :resize_keyboard, Boolean
|
|
6
|
-
attribute :one_time_keyboard, Boolean
|
|
7
|
-
attribute :selective, Boolean
|
|
5
|
+
attribute :resize_keyboard, Boolean, default: false
|
|
6
|
+
attribute :one_time_keyboard, Boolean, default: false
|
|
7
|
+
attribute :selective, Boolean, default: false
|
|
8
8
|
end
|
|
9
9
|
end
|
|
10
10
|
end
|
data/lib/telegrammer/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: telegrammer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Luis Mayoral
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-06-
|
|
11
|
+
date: 2015-06-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -139,3 +139,4 @@ signing_key:
|
|
|
139
139
|
specification_version: 4
|
|
140
140
|
summary: Ruby client for the Telegram's Bots API
|
|
141
141
|
test_files: []
|
|
142
|
+
has_rdoc:
|