99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
# File 'lib/fastlane/plugin/work_wechat/actions/work_wechat_action.rb', line 99
def self.news_http_body(params)
news_title = params[:news_title]
news_description = params[:news_description]
news_url = params[:news_url]
news_picurl = params[:news_picurl]
body = {}
body['msgtype'] = "news"
article = { 'title'=>news_title, 'url'=>news_url}
article['description'] = news_description if news_description
article['picurl'] = news_picurl if news_picurl
articles = [article]
body['news'] = {'articles'=>articles}
body.to_json
end
|