نماذج واجهة برمجة تطبيقات Google Drive
يوفّر هذا القسم عيّنات لواجهة برمجة التطبيقات Google Drive API.
للاطّلاع على فيديوهات تمهيدية عن Drive API، يمكنك الاطّلاع على مكتبة فيديوهات Drive API.
تستضيف Google النماذج التالية على GitHub. يمكنك إنشاء نسخة من هذه المستودعات
واستخدام الرمز البرمجي كمرجع لمشاريعك الخاصة.
Google Picker
يوضّح نموذج رمز Google Picker كيفية استخدام
أداة اختيار الصور أو صفحة التحميل التي يمكن للمستخدمين فتحها من زر في تطبيق ويب.
للاطّلاع على المصدر أو تنزيله، انتقِل إلى
Google Picker
في مستودع GitHub.
فتح الملفات وحفظها باستخدام "محرّري النصوص السريعة"
يوضّح نموذج رمز 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-02-24 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-02-24 (حسب التوقيت العالمي المتفَّق عليه)"],[[["This section provides Google Drive API samples, including code for integrating Google Picker and Quickeditors into web applications."],["The Google Picker sample demonstrates how to implement an image selector or upload page within a web app."],["Quickeditors samples showcase opening and saving files with the Drive API, including integration with Drive UI's \"New\" and \"Open with\" functionalities."],["Source code for both Google Picker and Quickeditors is available on GitHub for reference and adaptation in your projects."]]],["Google offers code samples on GitHub for the Drive API. The Google Picker sample demonstrates using an image selector or upload page within a web app, accessible via a button. The Quickeditors sample illustrates how to open and save files, integrating with Drive's \"New\" button and \"Open with\" context menu. Both samples provide text editor apps for files with the `text/*` MIME type. Source code is available on GitHub, which can be forked.\n"]]