공유 연락처 업데이트와 삭제는 연락처의 수정 URL을 사용한다는 점에서 유사합니다.
공유 연락처 업데이트
항목을 업데이트할 때는 서버에서 가져온 모든 XML을 유지합니다. 그렇지 않으면 무시된 요소가 삭제됩니다. 업데이트가 자동 완성 및 연락처 관리자에 반영되는 데 최대 24시간이 걸릴 수 있습니다.
기존 공유 연락처를 업데이트하려면 다음 단계를 따르세요.
- 업데이트할 항목 가져오기
- 항목을 수정합니다.
업데이트된 항목을 사용하여 연락처의 수정 URL로
PUT요청을 보냅니다.application/atom+xml콘텐츠 유형을 사용하고<id>값이 기존 항목과 정확히 일치하는지 확인합니다. 수정 URL은 충돌을 감지하기 위해 버전 번호로 끝납니다. 자세한 내용은 버전 관리를 참고하세요.항목을 업데이트합니다.
<entry> <id>https://www.google.com/m8/feeds/contacts/DOMAIN/base/8411573</id> <updated>2008-02-28T18:47:02.303Z</updated> <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact' /> <title type='text'>TITLE_NAME</title> <gd:name> <gd:fullName>FIRST_NAME LAST_NAME</gd:fullName> </gd:name> <content type='text'>NOTES</content> <link rel='self' type='application/atom+xml' href='https://www.google.com/m8/feeds/contacts/DOMAIN/PROJECTION/8411573' /> <link rel='edit' type='application/atom+xml' href='https://www.google.com/m8/feeds/contacts/DOMAIN/PROJECTION/8411573/1204224422303000' /> <gd:phoneNumber rel='http://schemas.google.com/g/2005#other' primary='true'>PRIMARY_PHONE_NUMBER</gd:phoneNumber> <gd:extendedProperty name="CUSTOM_PROPERTY" value="CUSTOM_PROPRTY_VALUE" /> </entry>
다음을 바꿉니다.
DOMAIN: 도메인(예: example.com)TITLE_NAME: 항목의 이름입니다(예: example.com 연락처 목록).FIRST_NAME: 연락처의 이름입니다.LAST_NAME: 연락처의 성입니다.PROJECTION: 투영 값입니다. 지원되는 값은 프로젝션 값을 참고하세요.PRIMARY_PHONE_NUMBER: 선호하는 전화번호입니다.CUSTOM_PROPERTY: 맞춤 속성의 이름입니다.CUSTOM_PROPRTY_VALUE: 맞춤 속성의 값입니다.수정 URL이 강조 표시된 업데이트된 항목의 예:
<entry> <id>https://www.google.com/m8/feeds/contacts/example.com/base/8411573</id> <updated>2008-02-28T18:47:02.303Z</updated> <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact' /> <title type='text'>Fitzgerald</title> <gd:name> <gd:fullName>Fitzgerald</gd:fullName> </gd:name> <content type='text'>Notes</content> <link rel='self' type='application/atom+xml' href='https://www.google.com/m8/feeds/contacts/example.com/full/8411573' /> <link rel='edit' type='application/atom+xml' href='https://www.google.com/m8/feeds/contacts/example.com/full/8411573/1204224422303000' /> <gd:phoneNumber rel='http://schemas.google.com/g/2005#other' primary='true'>456-123-2133</gd:phoneNumber> <gd:extendedProperty name="pet" value="hamster" /> <gd:extendedProperty name="cuisine"> <italian /> </gd:extendedProperty> </entry>
공유 연락처 삭제
삭제된 연락처가 자동 완성 및 연락처 관리자에서 사라지는 데 최대 24시간이 걸릴 수 있습니다. 연락처를 삭제하고 다시 추가하여 업데이트하지 마세요. 대신 연락처 업데이트하기를 참고하세요.
- 공유 연락처를 삭제하려면 연락처의 수정 URL로
DELETE요청을 보냅니다. 이 URL은 연락처를 업데이트하는 데 사용되는 URL과 동일합니다.
Google은 삭제된 연락처의 자리표시자를 30일 동안 보관합니다. showdeleted 쿼리 매개변수를 사용하여 요청합니다.