A contact is an entry from a Yahoo! user's Address Book. Each contact has an email address and any information entered in the Address Book by the Yahoo! user.
The Contacts Tables include three tables for accessing a user's contact and connections as well as the updates of the user's contacts.
The Contacts Table supports both read and write statements. Use SELECT to read contacts, INSERT to add contacts, and DELETE to remove contacts.
social.contacts
DELETEINSERTSELECT| Key Name | Data Type | Allowed in Statements | Required in Statements | Default Value | Description |
|---|---|---|---|---|---|
contact_guid
|
string |
SELECT
|
SELECT
|
None | The GUID of the contact. |
contact_id
|
string | DELETE,SELECT |
DELETE,SELECT |
None | The contact ID (CID) identifies the user's contact. |
email
|
string |
INSERT
|
None | None | The email address of the contact. |
familyName
|
string |
INSERT
|
None | None | The family name of the contact. |
filters
|
string |
SELECT
|
None | None | The filter expression used to return a subset of a collection. See Filters for more information. Example: filters="phone.startswith=415" |
givenName
|
string |
INSERT
|
None | None | The given name of the contact. |
guid
|
string | DELETE, INSERT, SELECT |
DELETE, SELECT |
None | The GUID of the profile owner. |
nickname
|
string |
INSERT
|
None | None | The nickname of the contact. |
out
|
string |
SELECT
|
None | None | The fields to return for each contact. See the Contact Field Types for a list of possible values. For example, to return just
the email information for a contact, use the following syntax: out="email" |
owner_guid
|
string |
INSERT
|
INSERT
|
None | The GUID of the profile owner. |
This example statement deletes the signed-in user's contact identified by the contact ID 303.
DELETE FROM social.contacts WHERE guid=me AND contact_id=303
This example statements adds a new contact for the Yahoo! users identified by the GUID "GTB6FCEBZO3MDCUQQNNEFIBWM".
INSERT INTO social.contacts (owner_guid, givenName, familyName, email, nickname) VALUES ("GTB6FCEBZO3MDCUQQNNEFIBWM", 'John',
'Doe', 'johndoe@yahoo.com', 'Jodo')
This example statement returns ten contacts of the signed-in user. Run the query in the YQL Console.
SELECT * FROM social.contacts WHERE guid=me
This example statement returns the signed-in user's contact with the GUID value of "4YBUYPS7BCOCZZO6OU2ZRFVNJZ".
SELECT * FROM social.contacts WHERE guid=me AND contact_guid='4YBUYPS7BCOCZZO6OU2ZRFVNJZ'
This example statement returns the signed-in user's contact with the contact ID 2.
SELECT * FROM social.contacts WHERE guid=me AND contact_id='2'
See the Elements of the Contact Object.