-
Notifications
You must be signed in to change notification settings - Fork 2
/
line_message.rb
35 lines (26 loc) · 889 Bytes
/
line_message.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
module LineMessage
class Message
attr_reader :from, :to, :id, :timestamp, :text, :sticker, :image, :revision, :log
def initialize(from, to, id, timestamp, text = nil, sticker = nil, image = nil, revision = nil, log = false)
@from, @to, @id, @timestamp, @text, @sticker, @image, @revision, @log = from, to, id, timestamp, text, sticker, image, revision, log
end
end
class Image
attr_reader :id, :url, :preview_url
def initialize(id, url = nil, preview_url = nil)
@id, @url, @preview_url = id, url, preview_url
end
end
class StickerSet
attr_reader :id, :name, :version, :stickers
def initialize(id, name, version, stickers)
@id, @name, @version, @stickers = id, name, version, stickers
end
end
class Sticker
attr_reader :set_id, :version, :id
def initialize(set_id, version, id)
@set_id, @version, @id = set_id, version, id
end
end
end