Sub UpdateSheet(range As String, value As String)
oauth2.GetAccessToken
Wait For OAuth2_AccessTokenAvailable (Success As Boolean, Token As String)
If Success = False Then
ToastMessageShow("Error accessing account.", True)
Return
End If
Dim j As HttpJob
j.Initialize("", Me)
j.PutString("https://sheets.googleapis.com/v4/spreadsheets/<SheetID>/values/"&range&"?valueInputOption=RAW&access_token=" & Token, _
"{""values"":[["""&value&"""]]}")
j.GetRequest.SetContentType("application/json")
Wait For (j) JobDone(j As HttpJob)
If j.Success = True Then
Log("Response Length:" & j.GetString.Length & " bytes")
Log(j.GetString)
End If
j.Release
End Sub