تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تتيح لك خدمة "جهات الاتصال" المتقدّمة استخدام
People API في Apps Script. تسمح واجهة برمجة التطبيقات هذه للنصوص البرمجية
بإنشاء بيانات جهات الاتصال للمستخدم الذي سجّل الدخول وقراءتها وتعديلها وقراءة بيانات
الملف الشخصي لمستخدمي Google.
مراجع
للحصول على معلومات تفصيلية عن هذه الخدمة، يُرجى الاطّلاع على
مستندات المرجع لواجهة برمجة التطبيقات People API.
مثل جميع الخدمات المتقدّمة في Apps Script، تستخدم خدمة "المستخدمون" المتقدّمة
العناصر والأساليب والمَعلمات نفسها المستخدَمة في واجهة برمجة التطبيقات المتاحة للجميع. لمزيد من المعلومات، اطّلِع على كيفية تحديد توقيعات الطرق.
للإبلاغ عن المشاكل والعثور على دعم آخر، يُرجى الاطّلاع على
دليل دعم People v1.
نموذج التعليمات البرمجية
يستخدم نموذج الرمز البرمجي أدناه الإصدار 1 من واجهة برمجة التطبيقات.
/** * Gets a list of people in the user's contacts. * @see https://developers.google.com/people/api/rest/v1/people.connections/list */functiongetConnections(){try{// Get the list of connections/contacts of user's profileconstpeople=People.People.Connections.list('people/me',{personFields:'names,emailAddresses'});// Print the connections/contactsconsole.log('Connections:%s',JSON.stringify(people,null,2));}catch(err){// TODO (developers) - Handle exception hereconsole.log('Failedtogettheconnectionwithanerror%s',err.message);}}
/** * Gets the own user's profile. * @see https://developers.google.com/people/api/rest/v1/people/getBatchGet */functiongetSelf(){try{// Get own user's profile using People.getBatchGet() methodconstpeople=People.People.getBatchGet({resourceNames:['people/me'],personFields:'names,emailAddresses'// Use other query parameter here if needed});console.log('Myself:%s',JSON.stringify(people,null,2));}catch(err){// TODO (developer) -Handle exceptionconsole.log('Failedtogetownprofilewithanerror%s',err.message);}}
/** * Gets the person information for any Google Account. * @param {string} accountId The account ID. * @see https://developers.google.com/people/api/rest/v1/people/get */functiongetAccount(accountId){try{// Get the Account details using account ID.constpeople=People.People.get('people/'+accountId,{personFields:'names,emailAddresses'});// Print the profile details of Account.console.log('PublicProfile:%s',JSON.stringify(people,null,2));}catch(err){// TODO (developer) - Handle exceptionconsole.log('Failedtogetaccountwithanerror%s',err.message);}}
تاريخ التعديل الأخير: 2024-12-21 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2024-12-21 (حسب التوقيت العالمي المتفَّق عليه)"],[[["The advanced People service in Apps Script utilizes the People API to manage contact data for the logged-in user and access Google user profiles."],["This advanced service needs to be enabled before use and mirrors the functionality of the public People API."],["Scripts can create, read, and update contact details for the current user, as well as retrieve profile information for other Google users."],["Sample code snippets are provided to demonstrate functionalities like fetching user connections, retrieving the user's own profile, and getting information for any Google Account by ID."]]],[]]