有人可以告诉我如何编写一个cURL来获取具有nextSyncToken的事件(仅已修改)列表吗? 这是我的代码不起作用:
roleMatch(allowedRoles):boolean{
var isMatch =false;
var userRoles:string[]=JSON.parse(localStorage.getItem('userroles')); //the error is here
allowedRoles.forEach(element => {
if(userRoles.indexOf(element)>-1){
isMatch=true;
return false;
}
})
return isMatch;
}
答案 0 :(得分:0)
是的,我已经做到了! 这是我的代码:
import requests
url = "https://www.googleapis.com/calendar/v3/calendars/here_calendar_id/events"
querystring = {"syncToken":"here_token"}
headers = {
'Content-Type': "application/json",
}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)