0

Google Contacts v3 API (スコープhttps://www.google.com/m8/feeds/ )の開発とテスト中に、ID を持たない会社の共有連絡先リスト (つまり、ディレクトリ フォルダー) にエントリを作成しました。また、クリックすることもできません (「連絡先が見つかりませんでした」)。したがって、そのエントリを削除できません。また、「連絡先のリスト」を要求してもリストされません (totalResults: 0)。

Google for Work サポートはここではサポートできませんでした。このフォーラムで質問することをお勧めします。誰かがそのファントムエントリを取り除く方法を知っていることを願っています.

4

2 に答える 2

1

予想どおり、削除は Google が行う必要があり、私の側から追加の API 呼び出しを行うことはできませんでした。

于 2016-07-29T19:59:41.123 に答える
0

Shared Contacts APIを使用すると、クライアント アプリケーションは、Google Apps ドメイン内のすべてのユーザーに共有されている外部の連絡先を取得および更新できます。共有の連絡先は Apps ドメインのすべてのユーザーに表示され、すべての Google サービスが連絡先リストにアクセスできます。

公開する共有連絡先の XML 表現を作成します。この XML は、次のような Contact 種類の Atom 要素の形式である必要があります。

<atom:entry xmlns:atom='http://www.w3.org/2005/Atom'
xmlns:gd='http://schemas.google.com/g/2005'>
<atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/contact/2008#contact' />
<gd:name>
<gd:givenName>Elizabeth</gd:givenName>
<gd:familyName>Bennet</gd:familyName>
<gd:fullName>Elizabeth Bennet</gd:fullName>
</gd:name>
<atom:content type='text'>Notes</atom:content>
<gd:email rel='http://schemas.google.com/g/2005#work'
primary='true'
address='liz@gmail.com' displayName='E. Bennet' />
<gd:email rel='http://schemas.google.com/g/2005#home'
address='liz@example.org' />
<gd:phoneNumber rel='http://schemas.google.com/g/2005#work'
primary='true'>
(206)555-1212
</gd:phoneNumber>
<gd:phoneNumber rel='http://schemas.google.com/g/2005#home'>
(206)555-1213
</gd:phoneNumber>
<gd:im address='liz@gmail.com'
protocol='http://schemas.google.com/g/2005#GOOGLE_TALK'
primary='true'
rel='http://schemas.google.com/g/2005#home' />
<gd:structuredPostalAddress
rel='http://schemas.google.com/g/2005#work'
primary='true'>
<gd:city>Mountain View</gd:city>
<gd:street>1600 Amphitheatre Pkwy</gd:street>
<gd:region>CA</gd:region>
<gd:postcode>94043</gd:postcode>
<gd:country>United States</gd:country>
<gd:formattedAddress>
1600 Amphitheatre Pkwy Mountain View
</gd:formattedAddress>
</gd:structuredPostalAddress>

</atom:entry>

https://www.google.com/m8/feeds/contacts/example.com/full

Google サーバーは、送信されたエントリを使用して連絡先を作成し、要素HTTP 201 CREATEDの形式で新しい連絡先のコピーと共にステータス コードを返します。<entry>

クライアント アプリケーションは Shared Contacts API を使用して、新しい共有連絡先の作成、既存の共有連絡先の編集または削除、および特定の条件に一致する共有連絡先のクエリを実行できます。

連絡先を削除するには、許可されDELETEたリクエストを連絡先の編集 URL に送信します。

URL の形式は次のとおりです。

https://www.google.com/m8/feeds/contacts/{userEmail}/full/{contactId}

userEmailcontactIDの代わりに適切な値を使用します。

注: 特殊な userEmail 値 default を使用して、認証済みユーザーを参照できます。

API に送信されたリクエストが別のクライアントの変更を上書きしないようにするには、連絡先エントリEtagをリクエスト ヘッダーに指定する必要があります。

If-Match: Etag

Etagが古い場合、サーバーはHTTP 412 Precondition Failedステータス コードで応答します。

<!-- Request -->
DELETE /m8/feeds/contacts/default/full/contactId
If-match: Etag
...
<!-- Response -->
HTTP/1.1 200 OK
于 2016-07-27T09:09:09.387 に答える