我有自定义的笔记创建API。它们是设计模型的方式
postURL = "http://localhost/api/v1/notes/"
addNote = {
'title': noteTitle,
'text' : noteText,
'location' : noteLocation,
'lock' : '0',
'tags' : noteTags
}
这给了notesID
http://localhost/api/v1/notes/images/
http://localhost/api/v1/notes/videos/
def getAddNote():
token=getToken()
noteTitle=input("Enter Note Title: ")
noteText=input("Enter Note Text: ")
noteLocation=input("Enter Note Location: ")
noteTagsInput=input("Enter Note Tags: ")
tagList = noteTagsInput.split(",")
print(tagList)
tagList_=', '.join(map(lambda x: '"' + x + '"', tagList))
noteTags="["+tagList_+"]"
postURL = "http://localhost/api/v1/notes/"
addNote = {
'title': noteTitle,
'text' : noteText,
'location' : noteLocation,
'lock' : '0',
'tags' : noteTags
}
print(addNote)
postrequest = requests.post(postURL , headers={'Authorization': 'Token {}'.format(token),'Content-Type': 'application/json'}, data=json.dumps(addNote))
问:有没有一种方法可以在一次交易中进行3次电话回访
我想提交一个从我的客户申请拍摄的图像和视频
目前没有回答
相关问题 更多 >
编程相关推荐