|
廃止 |
|
2010/08/10 |
|
createEvent |
CalendarEvent |
カレンダー内に新規のイベントを作成する |
method createAllDayEvent(title, date)
| Arguments : |
| name | Type | 説明 |
|
title | String |
イベントのタイトル |
|
date | Date |
イベントの日付
|
method method createAllDayEvent(title, date, optAdvancedArgs)
| Arguments : |
| name | Type | 説明 |
|
title | String |
イベントのタイトル |
|
date | Date |
イベントの日付 |
|
optAdvancedArgs | Object |
未定義
|
| Advanced Arguments* : |
| name | Type | 説明 |
|
description | String |
イベントの説明 |
|
location | String |
イベントの場所 |
|
guests | String |
ゲストのメール(カンマ区切り) |
|
sendInvites | bool |
ゲストにメールを送信するかどうか
|
method createEvent(title, startDate, endDate, optAdvancedArgs)
-
新規のカレンダーイベントを作成する
カレンダーイベントを返す:作成できない場合はnullを返す
( 参考 :getEvents )
| Argument : |
| member | Type | 説明 |
|
title |
String |
新規イベントのタイトル |
|
startDate |
Date |
イベントの開始日と開始時刻 |
|
endDate |
Date |
イベントの終了日と終了時刻 |
|
optAdvancedArgs |
Object |
引数が以下のセクションで定義されたJavaScriptのオブジェクトフィールド |
| Advanced Argument : |
| member | Type | 説明 |
|
description |
String |
新規イベントの説明 |
|
guests |
String |
イベントに招待されたゲストのメールアドレスリスト(スプレッドシートカンマ区切り) |
|
location |
String |
イベントの場所 |
|
sendInvites |
bool |
falseが設定された場合招待状がゲストに送られない |
| サンプル : |
// The code below will add an event to the user's default Calendar
var cal = CalendarApp.getDefaultCalendar();
cal.createEvent("Busy", new Date("July 21, 2010 08:00:00 EST"), new Date("July 21, 2010 09:00:00 EST"),
{location:'Nap room'});
|
| サンプル : |
// The code below will add an event to the user's default Calendar
var cal = CalendarApp.getDefaultCalendar();
var title = "Busy";
var startDate = new Date("July 21, 2009 08:00:00");
var endDate = new Date("July 21, 2009 09:00:00");
var advancedArgs = {location:"Joe's office", description:"Discuss new APIs"};
cal.createEvent(title, startDate, endDate, advancedArgs);
最後の引数がどのようにイベントの場所と説明を設定しているか注意してください。
|
method createEventFromDescription(description)
| Arguments : |
| name | Type | 説明 |
|
description | String |
イベントについての説明(フリーなテキスト)
|
| サンプル : |
CalendarApp.getDefaultCalendar().createEventFromDescription("Lunch with Mary, 2PM on Feburary 2nd");
|
method deleteCalendar()
getColor()
-
このカレンダーの表示に使われているカラーを取得する
( 参考 :setColor)
| 戻り値 : |
| Type | 説明 |
|
color |
カレンダーのカラー色
|
method getDescription()
| 戻り値 : |
| Type | 説明 |
|
String |
カレンダーの説明
|
method getEvents(startDate, endDate, optStatus)
-
カレンダー内で指定期間内すべてのイベントを取得する
CalendarEventオブジェクトの配列を返す。オブジェクトは指定した時間範囲で開始または終了の時刻を持つ。指定された時間の範囲内でイベントが発見されない場合は空の配列を返す。もしオプションのパラメーターが指定された時は、呼び出しユーザーの指定されたステータスのあるイベントだけが返される。
| Arguments : |
| name | Type | 説明 |
|
startDate | Date |
期間内の開始日時
| |
endDate | Date |
期間内の終了日時 |
|
optStatus | String |
出席状態は{"はい"|"いいえ"|"たぶん"|"招待"|} ("Yes" | "No" | "Maybe" | "Invited")を表示
|
| サンプル : |
// The code below will retrieve all the events for the user's default calendar and
// display the description of the first event
var cal = CalendarApp.getDefaultCalendar();
var events = cal.getEvents(new Date("July 21, 2009 EST"), new Date("July 22, 2009 EST"));
if (events[0]) {
Browser.msgBox(events[0].getDescription());
}
|
// The code below will retrieve all the events for the user's default calendar, that the
// user has accepted, and display the description of the first event
var cal = CalendarApp.getDefaultCalendar();
var events = cal.getEvents(new Date("July 21, 2009 EST"), new Date("July 22, 2009 EST"), "Yes");
if (events[0]) {
Browser.msgBox(events[0].getDescription());
}
|
method getEvents(startTime, endTime)
| Arguments : |
| name | Type | 説明 |
|
startTime | Date |
範囲の開始時刻を返す |
|
endTime | Date |
範囲の終了時刻を返す
|
method getEvents(startTime, endTime, statusFilters)
| Arguments : |
| name | Type | 説明 |
|
startDate | Date |
期間内の開始日時
| |
endDate | Date |
期間内の終了日時 |
|
statusFilters | GuestStatus[ ] |
希望するステータス
|
| サンプル : |
CalendarApp.getDefaultCalendar().getEvents(new Date("May 1, 2010"), new Date("May 7, 2010"),
[CalendarApp.Attendance.OWNER, CalendarApp.Attendance.YES]);
|
method getEventsForDay(date)
-
一日のすべてのイベントの取得
Dateオブジェクトの日付部分だけが使用され、時刻は無視される
( 参考 :getEvents)
| Arguments : |
| name | Type | 説明 |
|
date | Date |
イベントのために取得する日
|
|