i have one user story need your help.
User Story: US1description: i want create a python file "WechatSender.py", which can help me create wechat draft article and publish it.
Acceptance Criteria:
when system environment wechat_appid and wechat_secret is null, log error and throw error
when i invoke WechatSender.send(event), a wechat draft article should been created and published
when i invoke WechatSender.send(event), should log article id
tech solutions:
event contains title:String, subTitle:String, content:String
invoke wechat api steps should be
invoke https://api.weixin.qq.com/cgi-bin/token to get access_token
invoke https://api.weixin.qq.com/cgi-bin/draft/add?access_token={{access_token}} to add wechat draft article and get media_id from response
invoke https://api.weixin.qq.com/cgi-bin/freepublish/submit?access_token={{access_token}} to publish article by input media_id
if you understand above requirements please say yes. secondly visualize your understanding about US1 , last step implement "WechatSender.py" for me
评论