2016-04-10 50 views

回答

0

請求用戶定義與您的投影映射

String url = "https://people.googleapis.com/v1/people/me/connections" + "?personFields=names,emailAddresses,userDefined";

的迴應是這樣的:

"userDefined": [ 
     { 
      "metadata": { 
      "primary": true, 
      "source": { 
       "type": "CONTACT", 
       "id": "5629e24b082d1a66" 
      } 
      }, 
      "key": "label1", 
      "value": "foo" 
     }, 
     { 
      "metadata": { 
      "source": { 
       "type": "CONTACT", 
       "id": "5629e24b082d1a66" 
      } 
      }, 
      "key": "label2", 
      "value": "bar" 
     } 
     ] 

有關詳細信息,請參閱https://developers.google.com/people/api/rest/v1/people#Person.UserDefined

您還可以更新自定義字段,即使文檔中則用戶自定義的不目前列表updatePersonFields的有效字段作爲字段掩碼。

https://developers.google.com/people/api/rest/v1/people/updateContact

相關問題