for v2, we can get an example how to rename file with google drive API. here's the link
https://developers.google.com/drive/api/v2/reference/files/patch#examples
here's how we can rename a file with v2 in javascript
/**
* Rename a file.
*
* @param {String} fileId <span style="font-size: 13px; ">ID of the file to rename.</span><br> * @param {String} newTitle New title for the file.
*/
function renameFile(fileId, newTitle) {
var body = {'title': newTitle};
var request = gapi.client.drive.files.patch({
'fileId': fileId,
'resource': body
});
request.execute(function(resp) {
console.log('New Title: ' + resp.title);
});
}
i need to create function like example from v2 with electron and nodejs. here's what i've done so far mfm-gdrive