I am trying to follow the Google Slides API reference material; 'Lines' but I must be missing something. I have successfully added rectangle shapes using the script, but now I want to connect them with a line. Here is what I have so far:
function addConnections()
{
var myPresentation = SlidesApp.getActivePresentation()
var presentationId = myPresentation.getId();
var slideId = myPresentation.getSlides()[0].getObjectId()
var requests = []
requests.push(
{
createLine:
{
lineProperties:
{
startConnection:
{
connectedObjectId: 'queryD200',
connectionSiteIndex: 3
},
endConnection:
{
connectedObjectId: 'queryD201',
connectionSiteIndex: 0
}
},
lineType: 'CURVED_CONNECTOR_2'
}
})
Slides.Presentations.batchUpdate({requests: requests}, presentationId);
}
The error that I get is: Unknown name "lineType" at 'requests[0].create_line': Cannot find field. Unknown name "lineProperties" at 'requests[0].create_line': Cannot find field.
But those are the exact field names that google uses in their documentation. I tried them both with quotations and without. Please Help! and thank you