Skip to content

Instantly share code, notes, and snippets.

@shikumiya-hata
Created October 26, 2020 05:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shikumiya-hata/143167db93e21e77e43823670ba368dd to your computer and use it in GitHub Desktop.
Save shikumiya-hata/143167db93e21e77e43823670ba368dd to your computer and use it in GitHub Desktop.
/**
* 新規に共有ドライブを作成する
* @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