Created
October 26, 2020 05:29
-
-
Save shikumiya-hata/143167db93e21e77e43823670ba368dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 新規に共有ドライブを作成する | |
* @param {string} teamDriveName - 共有ドライブ名 | |
* @return {TeamDrive} - 新規の共有ドライブ | |
*/ | |
function create(teamDriveName) { | |
// 論理的な共有ドライブを作成 | |
var teamDrive = Drive.newTeamDrive() | |
teamDrive.name = teamDriveName // 共有ドライブに名前を付ける | |
var teamDriveId = Utilities.getUuid() // アイテムのIDを生成 | |
// 物理的な共有ドライブを作成 | |
return Drive.Teamdrives.insert(teamDrive, teamDriveId) // ここで実際に共有ドライブが作られる | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment