多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
>[danger] **弃用提醒:** > *由于看云对于免费用户的限制愈发严苛,本文档已经迁移至语雀。本文档将不做维护。* > **语雀地址**:[https://www.yuque.com/a632079/nodebb](https://www.yuque.com/a632079/nodebb) ***** ## 通过 NodeBB API 自动发帖 以下 Demo(Python): ```python import requests class auto_topic(): def __init__(self,api_url,bearer_token): self.api_url = api_url self.bearer_token = bearer_token def create(self,uid,cid,title,content): headers = {"Authorization": "Bearer %s"%self.bearer_token} topic = {'uid':uid,'cid':cid,'title':title,'content':content} response = requests.post(self.api_url,headers = headers,data=topic) return response ``` >[info] 编写: [gaokaigithub](https://github.com/gaokaigithub) 维护: PA Team 审核: PA Team & NodeBB China 最后更新: 2017.08.08