Events: get

Returns an event. Try it now or see an example. イベントを返します。今すぐ試す、例を見てください

Request要求

HTTP requestHTTPリクエスト

GET https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId

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 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. 応答に含める参加者の最大数。指定した数を超える出席者がいる場合は、参加者だけが返されます。オプションです。
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 an Events resource in the response body.成功した場合、このメソッドはレスポンスボディにEventsリソースを返します。

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;
// ...
// Initialize Calendar service with valid OAuth credentials
Calendar service = new Calendar.Builder(httpTransport, jsonFactory, credentials)
    .setApplicationName("applicationName").build();
// Retrieve an event
Event event = service.events().get('primary', "eventId").execute();
System.out.println(event.getSummary());

Python

Uses the Python client library.Pythonクライアントライブラリを使用します

event = service.events().get(calendarId='primary', eventId='eventId').execute()
print event['summary']

PHP

Uses the PHP client library.PHPクライアントライブラリを使用します

$event = $service->events->get('primary', "eventId");
echo $event->getSummary();

Rubyルビー

Uses the Ruby client library.Rubyクライアントライブラリを使用します

result = client.get_event('primary', 'eventId')
print result.summary

Try it!それを試してみてください!

Use the APIs Explorer below to call this method on live data and see the response. 以下のAPI Explorerを使用して、ライブデータに対してこのメ??ソッドを呼び出して応答を確認してください。

関連記事

スポンサーリンク

比較演算子

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る