telegram-ruby 0.1.0 → 0.1.1

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: 846c1cc10ffea65fd25ecac7a05884fa1edbc0e9321f81245558cffcc61c6984
4
- data.tar.gz: f9545a566f47c5e98f5d312c6039d84eba1bd9f5dad210f76e241268ee4c5b7b
3
+ metadata.gz: 7be63af9915e9024d3fdcd839d48b38e0e104373492e33532dba662fb0f595b9
4
+ data.tar.gz: 57614b3e7908aa14a4a3394d99c4554e4e616b22f275ee60a4249e3dc7c55bb2
5
5
  SHA512:
6
- metadata.gz: 429581b8f2e9fd438d44f5d2f4f62c3a6d2a27e57f267594e7732b886367ec980b33ad373d222da4e4f58b8b38dfff1753080090ad05919c3f82c02013c86e12
7
- data.tar.gz: 460a6bd5ef2e217360785c0bad3a3fa59335ebd322856d786f081ad6e8e5a12b81c50a4c15d0c1bb4e614966adc8cefc70bb6fae1f404c2b0670e46f32abba4a
6
+ metadata.gz: 1abf6011c4aa7a4cf7c4308f93f759af9e99c878d32ad55239fd65f6b9439afdc140a3d491e6627617ca89dc8428d730c24b2d6de8bef7780f8ba6b1dd99ff59
7
+ data.tar.gz: 6d2013e1ce782d5aa14fdc427e03e8230c2ddecc364e6245bbef3014264dc2ad1316b5cd2ea37c39317aef40877d5258b589286b2ea4ac8ca2e7e457cd4974d2
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
1
  # Changelog
2
2
 
3
- ##0.1.0
3
+ ## 0.1.1
4
+ - Fix photo setter in Telegram::Bot::Types::Message
5
+ - Update README.md
6
+
7
+ ## 0.1.0
4
8
  - Initialize repo
data/README.md CHANGED
@@ -88,6 +88,16 @@ In your handler you can use helper accessors
88
88
 
89
89
  **command** - current command if found in message text (without prefix cmd_)
90
90
 
91
+ ### Send Photo
92
+ From url
93
+ ```
94
+ api.sendPhoto([Chat id], [Url to image], {caption: 'Image caption'})
95
+ ```
96
+ From server
97
+ ```
98
+ api.sendPhoto([Chat id], Faraday::UploadIO.new([patg to image], 'image/png', 'my_image.png'), {caption: 'Image caption'})
99
+ ```
100
+
91
101
  ## Contributing
92
102
 
93
103
  Bug reports and pull requests are welcome on GitHub at https://github.com/Stajor/telegram-ruby. 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.
@@ -87,7 +87,7 @@ module Telegram::Bot::Types
87
87
  end
88
88
 
89
89
  def photo=(attributes)
90
- @photo = PhotoSize.new(attributes)
90
+ @photo = attributes.map {|photo| PhotoSize.new(photo)}
91
91
  end
92
92
 
93
93
  def sticker=(attributes)
@@ -1,3 +1,3 @@
1
1
  module Telegram
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -24,6 +24,6 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency "rake", "~> 10.0"
25
25
  spec.add_development_dependency "rspec", "~> 3.0"
26
26
 
27
- spec.add_dependency 'faraday'
28
- spec.add_dependency 'faraday_middleware'
27
+ spec.add_dependency 'faraday', '~> 0'
28
+ spec.add_dependency 'faraday_middleware', '~> 0'
29
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telegram-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Belenky
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-22 00:00:00.000000000 Z
11
+ date: 2018-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -56,28 +56,28 @@ dependencies:
56
56
  name: faraday
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: faraday_middleware
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  description: