D3TT 网站API接口说明


网站内容发布接口

请求地址: https://www.d3tt.com/api/cgi-create?key=xxxxxxxxxxxxxx

请求方式: POST

请求类型: application/json

返回类型: json

CURL请求发送示例

curl 'https://www.d3tt.com/api/cgi-create?key=xxxxxxxxxxxxxx' \
	-H 'Content-Type: application/json' \
	-d '{
		"type": "markdown", 
		"title": "测试标题",
		"markdown": {
			"content": "测试正文"
		}
	}'

Python请求发送示例

import requests
headers = {
	'Content-Type': 'application/json',
}

data = '{ "type": "markdown",  "title": "这里是标题","markdown": {"content": "这里是正文"}}'

response = requests.post('https://www.d3tt.com/api/cgi-create?key=xxxxxxxxxxxxxx', headers=headers, data=data)
print response.text

		
说明