reposync/comment_sync/add_gitlink_comment.py

21 lines
553 B
Python

import requests
import json
url = "https://gitlink.org.cn/api/v1/xumingyang21/reposyncer2/issues/8/journals.json"
payload = json.dumps({
"notes": "gitlink评论尝试3",
"receivers_login": [
"string"
]
})
access_token = 'zo07-W-W6vnU1mvQhVhIdfyyVY3K1R1piil_jfvS1bg'
headers = {
'Authorization': f'Bearer {access_token}', # 使用 Bearer 标记
'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)