Events: list
Returns events on the specified calendar. Try it now or see an example. 指定されたカレンダーの予定を返します。今すぐ試すか、例を見てください。
Request要求
HTTP requestHTTPリクエスト
GET https://www.googleapis.com/calendar/v3/calendars/calendarId/events
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 キーワード" "を使用してください。 |
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です。 |
iCalUID |
string |
Specifies event ID in the iCalendar format to be included in the response. Optional. 応答に含めるiCalendar形式のイベントIDを指定します。オプションです。 |
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. The number of events in the resulting page may be less than this value, or none at all, even if there are more events matching the query. Incomplete pages can be detected by a non-empty nextPageToken field in the response. By default the value is 250 events. The page size can never be larger than 2500 events. Optional.
1つの結果ページに返されるイベントの最大数 結果のページのイベント数は、この値より少なくても、クエリに一致するイベントがもっとあってもまったくない場合があります。不完全なページはnextPageToken 、レスポンス内の空でないフィールドによって検出される可能性があります。デフォルトでは、値は250イベントです。ページサイズは2500イベントを超えることはできません。オプションです。 |
orderBy |
string |
The order of the events returned in the result. Optional. The default is an unspecified, stable order.
Acceptable values are:
|
pageToken |
string |
Token specifying which result page to return. Optional. どの結果ページを返すかを指定するトークン。オプションです。 |
privateExtendedProperty |
string |
Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to return events that match all given constraints. 拡張プロパティー制約はpropertyName = valueとして指定されています。私有財産のみに一致します。このパラメーターは、与えられたすべての制約に一致するイベントを返すために複数回繰り返されることがあります。 |
q |
string |
Free text search terms to find events that match these terms in any field, except for extended properties. Optional. 拡張プロパティを除いて、任意のフィールドでこれらの用語と一致するイベントを見つけるためのフリーテキスト検索用語。オプションです。 |
sharedExtendedProperty |
string |
Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to return events that match all given constraints. 拡張プロパティー制約はpropertyName = valueとして指定されています。共有プロパティのみに一致します。このパラメーターは、与えられたすべての制約に一致するイベントを返すために複数回繰り返されることがあります。 |
showDeleted |
boolean |
Whether to include deleted events (with status equals "cancelled ") in the result. Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. Optional. The default is False.
削除されたイベント(status " cancelled " が等しい)を結果に含めるかどうか。(ただし、基本的な定期的なイベント)のイベントを定期的にキャンセルの場合は、まだ場合も含まれますshowDeleted し、singleEvents 両方ともFalseです。場合showDeleted やsingleEvents 削除されたイベントの両方の真の、唯一の単一インスタンスである(しかし、根本的な定期的なイベントではない)が返されます。オプションです。デフォルトはFalseです。 |
showHiddenInvitations |
boolean |
Whether to include hidden invitations in the result. Optional. The default is False. 結果に隠し招待を含めるかどうか。オプションです。デフォルトはFalseです。 |
singleEvents |
boolean |
Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves. Optional. The default is False. 繰り返しイベントをインスタンスに展開し、単一の1回限りのイベントと繰り返しイベントのインスタンスのみを返し、基本となる繰り返しイベント自体は返さないかどうか。オプションです。デフォルトはFalseです。 |
syncToken |
string |
Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All events deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False. There are several query parameters that cannot be specified together with nextSyncToken to ensure consistency of the client state. These are:
syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken . Learn more about incremental synchronization. Optional. The default is to return all entries. |
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, e.g., 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided but will be ignored. If timeMin is set, timeMax must be greater than timeMin .
フィルタ処理するイベントの開始時間の上限(これを含まない)。オプションです。デフォルトでは、開始時間でフィルタリングしません。2011-06-03T10:00:00-07:00、2011-06-03T10:00:00Zなど、必須のタイムゾーンオフセットを含むRFC3339タイムスタンプである必要があります。ミリ秒を指定できますが無視されます。timeMin が設定されている場合は、timeMax より大きい必要がありますtimeMin 。 |
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, e.g., 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided but will be ignored. If timeMax is set, timeMin must be smaller than timeMax .
イベントによるフィルタ処理の終了時間の下限(両端を含む)。オプションです。デフォルトでは、終了時間でフィルタリングしません。2011-06-03T10:00:00-07:00、2011-06-03T10:00:00Zなど、必須のタイムゾーンオフセットを含むRFC3339タイムスタンプである必要があります。ミリ秒を指定できますが無視されます。timeMax が設定されている場合、timeMin より小さくなければなりませんtimeMax 。 |
timeZone |
string |
Time zone used in the response. Optional. The default is the time zone of the calendar. 応答に使用されたタイムゾーン。オプションです。デフォルトはカレンダーのタイムゾーンです。 |
updatedMin |
datetime |
Lower bound for an event's last modification time (as a RFC3339 timestamp) to filter by. When specified, entries deleted since this time will always be included regardless of showDeleted . Optional. The default is not to filter by last modification time.
イベントの最終変更時刻(RFC3339タイムスタンプとして)の下限値。指定した場合、今回以降に削除されたエントリは、に関係なく常に含まれshowDeleted ます。オプションです。デフォルトでは、最終変更時刻でフィルタリングしません。 |
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 events in the specified calendar String pageToken = null; do { Events events = service.events().list('primary').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().list(calendarId='primary', 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->listEvents('primary'); while(true) { foreach ($events->getItems() as $event) { echo $event->getSummary(); } $pageToken = $events->getNextPageToken(); if ($pageToken) { $optParams = array('pageToken' => $pageToken); $events = $service->events->listEvents('primary', $optParams); } else { break; } }
Rubyルビー
Uses the Ruby client library.Rubyクライアントライブラリを使用します。
page_token = nil begin result = client.list_events('primary', page_token: page_token) 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: instances
- Events: insert
- Events: import
- Events: get
- Events: delete
スポンサーリンク