Acl: list

Requires authorization 承認が必要

Returns the rules in the access control list for the calendar. Try it now or see an example. カレンダーのアクセス制御リスト内の規則を返します。今すぐ試す、例を見てください

Request要求

HTTP requestHTTPリクエスト

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

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オプションのクエリパラメータ
maxResults integer Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. 1つの結果ページに返される最大エントリ数。デフォルトでは、値は100エントリです。ページサイズは250エントリを超えることはできません。オプションです。
pageToken string Token specifying which result page to return. Optional. どの結果ページを返すかを指定するトークン。オプションです。
showDeleted boolean Whether to include deleted ACLs in the result. Deleted ACLs are represented by role equal to "none". Deleted ACLs will always be included if syncToken is provided. Optional. The default is False. 削除されたACLを結果に含めるかどうか。削除されたACLはrole" none" と同じで表されます。削除されたACL syncTokenは、提供されていれば常に含まれます。オプションです。デフォルトは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 entries deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False.
If the 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. nextSyncToken前回のリスト要求の結果の最後のページに返され たフィールドから取得したトークン。このリスト要求の結果に、それ以降に変更されたエントリだけが含まれるようにします。前回のリスト要求以降に削除されたすべてのエントリは常に結果セットに含まれshowDeleted、False に設定することはできません。
場合はsyncToken有効期限が切れると、サーバは410 GONE応答コードで応答すると、クライアントは、そのストレージをクリアし、任意のせずに完全な同期を実行する必要がありますsyncToken。増分同期の
詳細を学んでください
オプションです。デフォルトではすべてのエントリが返されます。

Authorization承認

This request requires authorization with the following scope (read more about authentication and authorization).この要求には、以下の範囲での承認が必要です(認証と承認についての詳細を読んでください)。

Scope範囲
https://www.googleapis.com/auth/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#acl",
  "etag": etag,
  "nextPageToken": string,
  "nextSyncToken": string,
  "items": [
    acl Resource
  ]
}
Property nameプロパティ名 Value Description説明 Notesノート
kind string Type of the collection ("calendar#acl").コレクションの種類( " calendar#acl")。
etag etag ETag of the collection.コレクションのETag。
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 rules on the access control list.アクセス制御リストの規則のリスト。
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.Acl;
import com.google.api.services.calendar.model.AclRule;
// ...
// Initialize Calendar service with valid OAuth credentials
Calendar service = new Calendar.Builder(httpTransport, jsonFactory, credentials)
    .setApplicationName("applicationName").build();
// Iterate over a list of access rules
Acl acl = service.acl().list('primary').execute();
for (AclRule rule : acl.getItems()) {
  System.out.println(rule.getId() + ": " + rule.getRole());
}

Python

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

acl = service.acl().list(calendarId='primary').execute()
for rule in acl['items']:
  print '%s: %s' % (rule['id'], rule['role'])

PHP

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

$acl = $service->acl->listAcl('primary');
foreach ($acl->getItems() as $rule) {
  echo $rule->getId() . ': ' . $rule->getRole();
}

Rubyルビー

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

result = client.list_acls('primary')
result.items.each do |e|
  print e.id + ": " + e.role + "\n"
end

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

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

関連記事

スポンサーリンク

COALESCE関数 NULL値でない最初の引数を返す

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

上に戻る