अब काम नहीं करता. इसके बजाय, People API की बेहतर सेवा का इस्तेमाल करें
संपर्क में मौजूद ईमेल फ़ील्ड.
तरीके
तरीका | रिटर्न टाइप | संक्षिप्त विवरण |
---|---|---|
get | String | इस फ़ील्ड का पता पाएं. |
get | Object | इस फ़ील्ड का लेबल दिखाता है. |
is | Boolean | यह पता लगाता है कि यह प्राइमरी फ़ील्ड की वैल्यू है या नहीं. |
set |
| इस फ़ील्ड का पता सेट करता है. |
set |
| इस फ़ील्ड को प्राइमरी के तौर पर सेट करता है. |
set |
| इस फ़ील्ड का लेबल सेट करता है. |
set |
| इस फ़ील्ड का लेबल सेट करता है. |
अब काम न करने वाले तरीके
तरीका | रिटर्न टाइप | संक्षिप्त विवरण |
---|---|---|
| void | संपर्क सूची से यह ईमेल पता मिटा देता है. |
| String | इस ईमेल पते का डिसप्ले नेम दिखाता है. |
|
| इस ईमेल पते के लिए डिसप्ले नेम सेट करता है. |
ज़्यादा जानकारी वाला दस्तावेज़
getAddress()
इस फ़ील्ड का पता पाएं.
// Logs the address for the 'Home Address' field for contact 'John Doe'. // Can be used similarly for other fields that contain addresses. const contacts = ContactsApp.getContactsByName('John Doe'); const homeAddress = contacts[0].getAddresses(ContactsApp.Field.HOME_ADDRESS); Logger.log(homeAddress[0].getAddress());
वापसी का टिकट
String
— स्ट्रिंग के तौर पर पता
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या एक से ज़्यादा स्कोप के लिए अनुमति की ज़रूरत होती है:
-
https://www.google.com/m8/feeds
getLabel()
इस फ़ील्ड का लेबल दिखाता है. यह कोई फ़ील्ड, एक्सटेंडेड फ़ील्ड या स्ट्रिंग हो सकती है.
// Logs the label for all the address fields associated with contact // 'John Doe'. This method can be similarly called for any field that has // a label. const contacts = ContactsApp.getContactsByName('John Doe'); const addressFields = contacts[0].getAddresses(); for (let i = 0; i < addressFields.length; i++) { Logger.log(addressFields[i].getLabel()); }
वापसी का टिकट
Object
— इस फ़ील्ड का लेबल
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या एक से ज़्यादा स्कोप के लिए अनुमति की ज़रूरत होती है:
-
https://www.google.com/m8/feeds
isPrimary()
यह पता लगाता है कि यह प्राइमरी फ़ील्ड की वैल्यू है या नहीं.
// Logs whether or not the first address field associated with contact // 'John Doe' is labeled as primary. This method can be similarly called // for any field. const contacts = ContactsApp.getContactsByName('John Doe'); const addressFields = contacts[0].getAddresses(); Logger.log(addressFields[0].isPrimary());
वापसी का टिकट
Boolean
— यह प्राइमरी है या नहीं
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या एक से ज़्यादा स्कोप के लिए अनुमति की ज़रूरत होती है:
-
https://www.google.com/m8/feeds
setAddress(address)
इस फ़ील्ड का पता सेट करता है.
// Sets the address for the 'Home Address' field for contact 'John Doe'. // Can be used similarly for other fields that contain addresses. const contacts = ContactsApp.getContactsByName('John Doe'); const homeAddress = contacts[0].getAddresses(ContactsApp.Field.HOME_ADDRESS); homeAddress[0].setAddress('123 Main St, Raleigh, NC, 27601');
पैरामीटर
नाम | टाइप | ब्यौरा |
---|---|---|
address | String | नया पता |
वापसी का टिकट
— यह फ़ील्ड, चेन करने के लिए काम का हैEmail
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या एक से ज़्यादा स्कोप के लिए अनुमति की ज़रूरत होती है:
-
https://www.google.com/m8/feeds
setAsPrimary()
इस फ़ील्ड को प्राइमरी के तौर पर सेट करता है.
// Sets the first address field associated with contact 'John Doe' // as primary. This method can be similarly called for any field. const contacts = ContactsApp.getContactsByName('John Doe'); const addressFields = contacts[0].getAddresses(); addressFields[0].setAsPrimary();
वापसी का टिकट
— चेन करने के लिए यह FieldValueEmail
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या एक से ज़्यादा स्कोप के लिए अनुमति की ज़रूरत होती है:
-
https://www.google.com/m8/feeds
setLabel(field)
इस फ़ील्ड का लेबल सेट करता है.
// Sets the label to 'Work' for the first address field associated // with contact 'John Doe'. This method can be similarly called for any // field that has a label. const contacts = ContactsApp.getContactsByName('John Doe'); const addressFields = contacts[0].getAddresses(); addressFields[0].setLabel(ContactsApp.Field.WORK_ADDRESS);
पैरामीटर
नाम | टाइप | ब्यौरा |
---|---|---|
field |
| नया स्टैंडर्ड लेबल |
वापसी का टिकट
— चेन करने के लिए यह FieldValueEmail
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या एक से ज़्यादा स्कोप के लिए अनुमति की ज़रूरत होती है:
-
https://www.google.com/m8/feeds
setLabel(label)
इस फ़ील्ड का लेबल सेट करता है.
// Sets the label to 'Apartment' for the first address field associated // with contact 'John Doe'. This method can be similarly called for any // field that has a label. const contacts = ContactsApp.getContactsByName('John Doe'); const addressFields = contacts[0].getAddresses(); addressFields[0].setLabel('Apartment');
पैरामीटर
नाम | टाइप | ब्यौरा |
---|---|---|
label | String | इस फ़ील्ड के लिए नया लेबल |
वापसी का टिकट
— यह फ़ील्ड, चेन करने के लिए काम का हैEmail
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या एक से ज़्यादा स्कोप के लिए अनुमति की ज़रूरत होती है:
-
https://www.google.com/m8/feeds
अब काम न करने वाले तरीके
deleteEmailField()
deleteEmailField()
अब काम नहीं करता. इस फ़ंक्शन का इस्तेमाल बंद कर दिया गया है. इसलिए, नई स्क्रिप्ट में इसका इस्तेमाल नहीं किया जाना चाहिए.
संपर्क सूची से यह ईमेल पता मिटा देता है.
// Retrieves and deletes the work email address for contact 'John Doe' const contacts = ContactsApp.getContactsByName('John Doe'); const workEmail = contacts[0].getEmails(ContactsApp.Field.WORK_EMAIL); workEmail[0].deleteEmailField();
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या एक से ज़्यादा स्कोप के लिए अनुमति की ज़रूरत होती है:
-
https://www.google.com/m8/feeds
getDisplayName()
getDisplayName()
अब काम नहीं करता. इस फ़ंक्शन का इस्तेमाल बंद कर दिया गया है. इसलिए, नई स्क्रिप्ट में इसका इस्तेमाल नहीं किया जाना चाहिए.
इस ईमेल पते का डिसप्ले नेम दिखाता है.
// Logs the display name for the work email address for contact 'John Doe' const contacts = ContactsApp.getContactsByName('John Doe'); const workEmail = contacts[0].getEmails(ContactsApp.Field.WORK_EMAIL); Logger.log(workEmail[0].getDisplayName());
वापसी का टिकट
String
— इस ईमेल का डिसप्ले नेम
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या एक से ज़्यादा स्कोप के लिए अनुमति की ज़रूरत होती है:
-
https://www.google.com/m8/feeds
setDisplayName(name)
setDisplayName(name)
अब काम नहीं करता. इस फ़ंक्शन का इस्तेमाल बंद कर दिया गया है. इसलिए, नई स्क्रिप्ट में इसका इस्तेमाल नहीं किया जाना चाहिए.
इस ईमेल पते के लिए डिसप्ले नेम सेट करता है.
// Sets the display name to 'Doe, John' for the work email address for contact // 'John Doe' const contacts = ContactsApp.getContactsByName('John Doe'); const workEmail = contacts[0].getEmails(ContactsApp.Field.WORK_EMAIL); workEmail[0].setDisplayName('Doe, John');
पैरामीटर
नाम | टाइप | ब्यौरा |
---|---|---|
name | String | इस ईमेल पते का नया डिसप्ले नेम |
वापसी का टिकट
— यह ईमेल फ़ील्ड, चेन करने के लिए काम का हैEmail
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या एक से ज़्यादा स्कोप के लिए अनुमति की ज़रूरत होती है:
-
https://www.google.com/m8/feeds