2017-02-15 10 views
0

Google Apps Scriptの次の例では、label.restrictedを変更する行がファイルプロパティを正しく変更しません。スニペットの他のすべては、期待どおりに動作します。高度なGoogleサービスでは、Drive API v2を有効にしました(v3は私には利用できません)。誰でもこれをデバッグできますか?'label.restricted': 'true'はファイルの設定を正しく変更しません

function setSharing(email, fileId) { 
    var body = { 
    'value': email, 
    'role': 'reader', 
    'type': 'user' 
    }; 
    var options1 = { 
    'sendNotificationEmails': 'false', 
    }; 
    var options2 = { 
    'labels.restricted': 'true', 
    'writersCanShare': 'false' 
    }; 
    Drive.Permissions.insert(body, fileId, options1); 
    Drive.Files.update(options2, fileId); 
} 

答えて

0

次のように変更しますか?

'labels.restricted': 'true', 

から

'labels': {'restricted': true}, 
+0

パーフェクトに!ありがとう! – Matt

関連する問題