khl 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/khl/message.rb +0 -8
- data/lib/khl/version.rb +1 -1
- metadata +1 -2
- data/lib/khl/event.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c30c3cd4f5ee8a0651ab2d9d54d72aececf1b9e5dba9fc9436404c5a8dcb313
|
4
|
+
data.tar.gz: 686559adab9d55c78d98c141e9a1210600eefaa004db809418e073e10386dda2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66eef5f3b1ffc6f2c5918071b2d4185622c3eb0f1592e18ea27d0033d86b4c5cf32ce9de32f77dceb32620399c081011469f37ad1d2342a09a6c4b0dcdd8d171
|
7
|
+
data.tar.gz: 665b6eeee9390e920fde7438482dfea57dc09b227c3095be2a1a1e0313989169ff08257ebf9332dd10c5db2a02786e25a6bc42904168cc7ae2bbbb49b2d0bbe9
|
data/CHANGELOG.md
CHANGED
data/lib/khl/message.rb
CHANGED
@@ -3,8 +3,6 @@
|
|
3
3
|
require "active_support/core_ext/hash/indifferent_access"
|
4
4
|
require "active_support/hash_with_indifferent_access"
|
5
5
|
|
6
|
-
require_relative "event"
|
7
|
-
|
8
6
|
module KHL
|
9
7
|
class Message
|
10
8
|
TYPES = %i[
|
@@ -38,12 +36,6 @@ module KHL
|
|
38
36
|
@sn = sn
|
39
37
|
end
|
40
38
|
|
41
|
-
def event
|
42
|
-
return unless event?
|
43
|
-
|
44
|
-
Event.new(@data)
|
45
|
-
end
|
46
|
-
|
47
39
|
def to_h
|
48
40
|
ActiveSupport::HashWithIndifferentAccess.new(
|
49
41
|
s: TYPES.index(type),
|
data/lib/khl/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: khl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dounx
|
@@ -54,7 +54,6 @@ files:
|
|
54
54
|
- CHANGELOG.md
|
55
55
|
- README.md
|
56
56
|
- lib/khl.rb
|
57
|
-
- lib/khl/event.rb
|
58
57
|
- lib/khl/http/asset.rb
|
59
58
|
- lib/khl/http/badge.rb
|
60
59
|
- lib/khl/http/base.rb
|
data/lib/khl/event.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "active_support/core_ext/hash/indifferent_access"
|
4
|
-
require "active_support/hash_with_indifferent_access"
|
5
|
-
|
6
|
-
module KHL
|
7
|
-
class Event
|
8
|
-
attr_accessor :channel_type, :type, :target_id, :author_id, :content, :msg_id, :msg_timestamp, :nonce, :extra
|
9
|
-
|
10
|
-
def initialize(params = {})
|
11
|
-
params = ActiveSupport::HashWithIndifferentAccess.new(params)
|
12
|
-
|
13
|
-
@channel_type = params[:channel_type]
|
14
|
-
@type = params[:type]
|
15
|
-
@target_id = params[:target_id]
|
16
|
-
@author_id = params[:author_id]
|
17
|
-
@content = params[:content]
|
18
|
-
@msg_id = params[:msg_id]
|
19
|
-
@msg_timestamp = params[:msg_timestamp]
|
20
|
-
@nonce = params[:nonce]
|
21
|
-
@extra = params[:extra]
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|