Sha256: 5ec17b54da5bb514d2c3faa0031b74c4e7bd0a872fae46021f0d6474a7e1fa1e
Contents?: true
Size: 778 Bytes
Versions: 7
Compression:
Stored size: 778 Bytes
Contents
module DingBot module Message # FeedCard类型 class FeedCard < Base attr_accessor :links def initialize(links=[]) @links = links end def msg_type TYPE::FEED_CARD end def body_params super.merge(feedCard: { links: @links.map {|link| link.format} }) end end # FeedCard跳转链接 class FeedCardLink attr_accessor :title, :pic_url, :message_url def initialize(title='', pic_url='', message_url='') @title = title @pic_url = pic_url @message_url = message_url end def format { title: @title, messageURL: @message_url, picURL: @pic_url } end end end end
Version data entries
7 entries across 7 versions & 1 rubygems