Events: instances
Returns instances of the specified recurring event. Try it now or see an example. 指定された繰り返しイベントのインスタンスを返します。今すぐ試すか、例を見てください。
Request要求
HTTP requestHTTPリクエスト
GET https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId/instances
Parametersパラメーター
Parameter nameパラメータ名 | Value値 | Description説明 |
---|---|---|
Path parametersパスパラメータ | ||
calendarId |
string |
Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary " keyword.
カレンダーID カレンダーIDを取得するには、calendarList.listメソッドを呼び出します。現在ログインしているユーザーのメインカレンダーにアクセスしたい場合は、primary キーワード" "を使用してください。 |
eventId |
string |
Recurring event identifier. 繰り返し発生するイベントID。 |
Optional query parametersオプションのクエリパラメータ | ||
alwaysIncludeEmail |
boolean |
Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an email address value in the mentioned places. Optional. The default is False.
email 実際の電子メールが利用できない場合でも、開催者、作成者、および出席者
のフィールドに常に値を含めるかどうか(つまり、生成された、機能しない値が提供されます)。このオプションの使用は推奨されておらず、言及された場所に電子メールアドレス値が存在しないことを処理できないクライアントによってのみ使用されるべきです。オプションです。デフォルトはFalseです。 |
maxAttendees |
integer |
The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. 応答に含める参加者の最大数。指定した数を超える出席者がいる場合は、参加者だけが返されます。オプションです。 |
maxResults |
integer |
Maximum number of events returned on one result page. By default the value is 250 events. The page size can never be larger than 2500 events. Optional. 1つの結果ページに返されるイベントの最大数 デフォルトでは、値は250イベントです。ページサイズは2500イベントを超えることはできません。オプションです。 |
originalStart |
string |
The original start time of the instance in the result. Optional. 結果内のインスタンスの元の開始時刻。オプションです。 |
pageToken |
string |
Token specifying which result page to return. Optional. どの結果ページを返すかを指定するトークン。オプションです。 |
showDeleted |
boolean |
Whether to include deleted events (with status equals "cancelled ") in the result. Cancelled instances of recurring events will still be included if singleEvents is False. Optional. The default is False.
削除されたイベント(status " cancelled " が等しい)を結果に含めるかどうか。singleEvents Falseの場合、キャンセルされた定期的な予定のインスタンスも含まれます。オプションです。デフォルトはFalseです。 |
timeMax |
datetime |
Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. Must be an RFC3339 timestamp with mandatory time zone offset. フィルタ処理するイベントの開始時間の上限(これを含まない)。オプションです。デフォルトでは、開始時間でフィルタリングしません。必須のタイムゾーンオフセットを含むRFC3339タイムスタンプである必要があります。 |
timeMin |
datetime |
Lower bound (inclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. Must be an RFC3339 timestamp with mandatory time zone offset. イベントによるフィルタ処理の終了時間の下限(両端を含む)。オプションです。デフォルトでは、終了時間でフィルタリングしません。必須のタイムゾーンオフセットを含むRFC3339タイムスタンプである必要があります。 |
timeZone |
string |
Time zone used in the response. Optional. The default is the time zone of the calendar. 応答に使用されたタイムゾーン。オプションです。デフォルトはカレンダーのタイムゾーンです。 |
Request bodyリクエストボディ
Do not supply a request body with this method.このメソッドでリクエストボディを指定しないでください。
Response応答
If successful, this method returns a response body with the following structure:成功した場合、このメソッドは以下の構造を持つレスポンスボディを返します。
{ "kind": "calendar#events", "etag": etag, "summary": string, "description": string, "updated": datetime, "timeZone": string, "accessRole": string, "defaultReminders": [ { "method": string, "minutes": integer } ], "nextPageToken": string, "nextSyncToken": string, "items": [ events Resource ] }
Property nameプロパティ名 | Value値 | Description説明 | Notesノート |
---|---|---|---|
kind |
string |
Type of the collection ("calendar#events ").コレクションの種類( " calendar#events ")。 |
|
etag |
etag |
ETag of the collection.コレクションのETag。 | |
summary |
string |
Title of the calendar. Read-only.カレンダーのタイトル 読み取り専用 | |
description |
string |
Description of the calendar. Read-only.カレンダーの説明 読み取り専用 | |
updated |
datetime |
Last modification time of the calendar (as a RFC3339 timestamp). Read-only.カレンダーの最終変更時刻(RFC 3339タイムスタンプとして)。読み取り専用 | |
timeZone |
string |
The time zone of the calendar. Read-only.カレンダーのタイムゾーン。読み取り専用 | |
accessRole |
string |
The user's access role for this calendar. Read-only. Possible values are:
|
|
defaultReminders[] |
list |
The default reminders on the calendar for the authenticated user. These reminders apply to all events on this calendar that do not explicitly override them (i.e. do not have reminders.useDefault set to True).認証されたユーザーの予定表のデフォルトの通知。これらのリマインダーは、このカレンダー上で明示的に上書きreminders.useDefault されていない(つまりTrueに設定されていない)すべてのイベントに適用されます。 |
|
defaultReminders[].method |
string |
The method used by this reminder. Possible values are:
Required when adding a reminder.アラームを追加するときに必要です。 |
writable 書き込み可能 |
defaultReminders[].minutes |
integer |
Number of minutes before the start of the event when the reminder should trigger. Valid values are between 0 and 40320 (4 weeks in minutes). Required when adding a reminder.アラームを追加するときに必要です。 |
writable 書き込み可能 |
nextPageToken |
string |
Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided.この結果の次のページにアクセスするためのトークン。それ以上の結果が得られない場合は省略され、その場合nextSyncToken は提供されます。 |
|
items[] |
list |
List of events on the calendar.カレンダー上の予定のリスト。 | |
nextSyncToken |
string |
Token used at a later point in time to retrieve only the entries that have changed since this result was returned. Omitted if further results are available, in which case nextPageToken is provided.この結果が返された後に変更されたエントリのみを取得するために後で使用されるトークン。さらなる結果が利用可能である場合nextPageToken は省略され、その場合は提供される。 |
Examples例
Note: The code examples available for this method do not represent all supported programming languages (see the client libraries page for a list of supported languages).注:このメソッドで使用可能なコード例は、サポートされているすべてのプログラミング言語を表しているわけではありません(サポートされている言語のリストについては、クライアントライブラリのページを参照してください)。
Java
Uses the Java client library.Javaクライアントライブラリを使用します。
import com.google.api.services.calendar.Calendar; import com.google.api.services.calendar.model.Event; import com.google.api.services.calendar.model.Events; // ... // Initialize Calendar service with valid OAuth credentials Calendar service = new Calendar.Builder(httpTransport, jsonFactory, credentials) .setApplicationName("applicationName").build(); // Iterate over the instances of a specific recurring event String pageToken = null; do { Events events = service.events().instances('primary', 'eventId').setPageToken(pageToken).execute(); List<Event> items = events.getItems(); for (Event event : items) { System.out.println(event.getSummary()); } pageToken = events.getNextPageToken(); } while (pageToken != null);
Python
Uses the Python client library.Pythonクライアントライブラリを使用します。
page_token = None while True: events = service.events().instances(calendarId='primary', eventId='eventId', pageToken=page_token).execute() for event in events['items']: print event['summary'] page_token = events.get('nextPageToken') if not page_token: break
PHP
Uses the PHP client library.PHPクライアントライブラリを使用します。
$events = $service->events->instances('primary', "eventId"); while(true) { foreach ($events->getItems() as $event) { echo $event->getSummary(); } $pageToken = $events->getNextPageToken(); if ($pageToken) { $optParams = array('pageToken' => $pageToken); $events = $service->events->instances('primary', "eventId", $optParams); } else { break; } }
Rubyルビー
Uses the Ruby client library.Rubyクライアントライブラリを使用します。
page_token = nil begin result = client.list_event_instances('primary', 'eventId') result.items.each do |e| print e.summary + "\n" end if result.next_page_token != page_token page_token = result.next_page_token else page_token = nil end end while !page_token.nil?
Try it!それを試してみてください!
Use the APIs Explorer below to call this method on live data and see the response. 以下のAPI Explorerを使用して、ライブデータに対してこのメ??ソッドを呼び出して応答を確認してください。
関連記事
- Events: watch
- Events: update
- Events: quickAdd
- Events: patch
- Events: move
- Events: list
- Events: insert
- Events: import
- Events: get
- Events: delete
スポンサーリンク