نماذج واجهة برمجة تطبيقات Google Drive
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يوفّر هذا القسم عيّنات لواجهة Google Drive API.
للاطّلاع على فيديوهات تمهيدية حول Drive API، يُرجى الانتقال إلى مكتبة فيديوهات Drive API.
تستضيف Google النماذج التالية على GitHub. يمكنك إنشاء نسخة من هذه المستودعات
واستخدام الرمز كمرجع لمشاريعك الخاصة.
Google Picker
يوضّح نموذج رمز Google Picker كيفية استخدام أداة اختيار الصور أو صفحة التحميل التي يمكن للمستخدمين فتحها من خلال زر في تطبيق ويب.
للاطّلاع على المصدر أو تنزيله، انتقِل إلى
أداة اختيار Google
في مستودع GitHub.
فتح الملفات وحفظها باستخدام Quickeditors
يوضّح نموذج الرمز البرمجي Quickeditors هذا كيفية فتح الملفات وحفظها باستخدام Drive API.
يعرض كل مثال من أمثلة الأنظمة الأساسية الخاصة بـ Drive تطبيقًا واحدًا نموذجيًا، وهو محرّر نصوص يُطلق عليه اسم Quickeditor، ويمكنه تعديل ملفات Drive التي تحمل نوع MIME text/*
. تتضمّن نسخة الويب حالتَي استخدام أساسيتَين في Drive، وهما:
وتتشابه خطوات كلتا حالتَي الاستخدام. يعيد Drive توجيه المستخدم إلى التطبيق بعد أن يختاره من قائمة الإنشاء أو قائمة السياق الخاصة بملف يتضمّن نوع MIME مسجّلاً.
لعرض المصدر أو تنزيله، انتقِل إلى Drive
Quickeditors في مستودع GitHub.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Google Drive API samples\n\nThis section provides samples for Google Drive API.\n\nFor introductory videos about Drive API, see the [Drive API\nvideo library](/workspace/drive/api/guides/videos).\n\nGoogle hosts the following samples on GitHub. You can fork these repositories\nand use the code as a reference for your own projects.\n\nGoogle Picker\n-------------\n\nThe [Google Picker code sample](/workspace/drive/picker/guides/sample) shows how to use\nan image selector or upload page that users can open from a button in a web app.\n\nTo view or download the source, visit\n[Google Picker](https://github.com/googleworkspace/browser-samples/tree/main/drive/picker)\non the GitHub repository.\n\nOpen and save files with Quickeditors\n-------------------------------------\n\nThis Quickeditors code sample shows how to open and save files with the\nDrive API.\n\nEach of the Drive platform-specific examples reflects a single\nsample app: a text editor, called a Quickeditor, capable of editing\nDrive files with the MIME type `text/*`. The [web\nversion](https://github.com/googleworkspace/drive-quickeditors/tree/main/web)\nimplements two fundamental Drive use cases:\n\n- [Integrate with Drive UI's \"New\" button](/workspace/drive/api/guides/integrate-create)\n- [Integrate with Drive UI's \"Open with\" context menu](/workspace/drive/api/guides/integrate-open)\n\nThe flow for both use cases is similar. Drive redirects a user to\nthe app after the user selects it from the create menu or the context menu of a\nfile with a registered [MIME type](/workspace/drive/api/guides/mime-types).\n\nTo view or download the source, visit [Drive\nQuickeditors](https://github.com/googledrive/web-quickeditor) on the GitHub\nrepository.\n\nRelated topics\n--------------\n\n- [The Google Picker API](/workspace/drive/picker/guides/overview)\n- [Drive UI integration overview](/workspace/drive/api/guides/about-apps)"]]