我正在尝试将图片作为调查问题,它给出了以下错误,
surveymonty.exceptions.SurveyMontyAPIError:{“错误”:{“ docs”:“ https://developer.surveymonkey.com/api/v3/#error-codes”,“消息”:“无法验证字段“标题”列表架构:字段中不允许使用“属性”未定义的其他属性'_data'“,” id“:” 1002“,” name“:”错误请求“,” http_status_code“:400}}
我正在使用以下JSON代码,
payload ={
"headings":
[
{
"heading": "This is a monkey",
"image": {
"img_url": "https://raw.githubusercontent.com/SurveyMonkey/public_api_docs/master/images/presentation.png"
}
}
],
"position": 4,
"family": "presentation",
"subtype": "descriptive_text"
}
请帮助!
最佳答案
您可能正在寻找image
子类型,有效负载应更像:
{
"headings": [{
"heading": "This is a monkey",
"image": {
"url": "https://raw.githubusercontent.com/SurveyMonkey/public_api_docs/master/images/presentation.png"
}
}],
"position": 4,
"family": "presentation",
"subtype": "image"
}