我正在使用Gmail API,需要使用附件创建新草稿,我正在遵循官方文档:https://developers.google.com/gmail/api/v1/reference/users/drafts/create
let response2 = await gmail.users.drafts.create({
'userId': 'me',
'resource': {
'message': {
'raw': payload
}
}
});
Run Code Online (Sandbox Code Playgroud)
此代码段在 Gmail 中创建草稿邮件,但无法从我的本地计算机附加该文件
enter code here我可以在哪里从本地找到附加文件的partId和零件数组
有效负载参考:https://www.any-api.com/googleapis_com/gmail/docs/Definitions/MessagePart
let response2 = await gmail.users.drafts.create({
'userId': 'me',
'resource': {
'message': {
'raw': payload
}
}
});
Run Code Online (Sandbox Code Playgroud)
我正在寻找一种方法将字符串变量拆分为两个.举个例子,如果我有:
$activities = "In the morning we will dance, in the evening we will sing"
Run Code Online (Sandbox Code Playgroud)
我想把它拆分成,
$activities1 = "In the morning we will dance"
$activities2 = "In the evening we will sing"
Run Code Online (Sandbox Code Playgroud)
我将不胜感激任何帮助.
谢谢