पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv0.2.0

firebaseapis

API खोज सेवा द्वारा वर्णित Google API के लिए स्वचालित ग्राहक पुस्तकालय।

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
20.5 हज़ार
लाइक
21
Pub अंक
160

पैकेज इंस्टॉल करें

flutter pub add firebaseapis

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

firebaseapis पैकेज एपीआई खोज सेवा के माध्यम से Google एपीआई को एक्सेस करने के लिए स्वचालित रूप से उत्पन्न क्लाइंट लाइब्रेरी प्रदान करता है। Flutter और Dart के लिए बनाया गया, यह официल एपीआई विवरणों से प्रकार-सुरक्षित एपीआई के उत्पादन के माध्यम से Firebase और अन्य Google सेवाओं के साथ बिना किसी बाधा के एकीकरण की अनुमति देता है। इससे डेवलपर्स को अपने ऐप्स में ड्राइव, कैलेंडर और क्लाउड स्टोरेज जैसे Google के विशाल पारिस्थितिकी तंत्र के साथ सीधे बातचीत करने की अनुमति मिलती है, जो एंड्रॉइड, आईओएस, वेब, मैकओएस, विंडोज और लिनक्स प्लेटफॉर्म पर उपलब्ध है। पैकेज invertase.io द्वारा बनाया जाता है और आधुनिक Flutter विकास कार्यप्रवाह का समर्थन करता है।

उपयोग

  • Google Drive के साथ एकीकरण
  • Google कैलेंडर डेटा को स्वीकृत करना
  • Google पहचान से उपयोगकर्ता की जानकारी लेना
  • बादल भंडारण संचालन का प्रबंधन
  • Google शीट्स के साथ डेटा सिंक करना
  • YouTube Data API से कनेक्ट कर रहा है

मुख्य विशेषताएँ

  • आधिकारिक API खोज दस्तावेजों से स्वचालित रूप से उत्पन्न
  • टाइप-सुरक्षित Dart इंटरफ़ेस
  • क्रॉस-प्लेटफ़ॉर्म समर्थन (Android, iOS, Web, macOS, Windows, Linux)
  • Firebase प्रोजेक्ट्स के साथ निरंतर एकीकरण
  • OAuth2 प्रमाणीकरण प्रवाहों का समर्थन करता है
  • नए Google API रिलीज़ के साथ नियमित अपडेट

इनके लिए उपयुक्त

  • Google API एक्सेस की आवश्यकता वाले ऐप बनाने वाले डेवलपर्स
  • कई गूगल सेवाओं के साथ एकीकरण की आवश्यकता वाले प्रोजेक्ट
  • सभी प्रमुख ओएस के लिए लक्षित क्रॉस-प्लेटफ़ॉर्म एप्लिकेशन
  • Firebase के रूप में बैकएंड इंफ्रास्ट्रक्चर का उपयोग करने वाली टीमें
  • Google सेवाओं के सुरक्षित, प्रमाणित API कॉल की आवश्यकता वाले ऐप्स

विचार योग्य बातें

  • Google API खोज फॉर्मेट के बारे में समझने की आवश्यकता है
  • प्रमाणीकरण सेटअप (OAuth2) जटिल हो सकता है
  • बड़े उत्पादित कोडबेस में बिल्ड साइज बढ़ सकता है
  • जनरेटेड API रेफरेंस के अलावा सीमित डॉक्युमेंटेशन
  • सरल उपयोग के मामलों के लिए आदर्श नहीं है जहां हल्के ग्राहक पर्याप्त हैं

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

Firebase API Client Libraries for Dart

Chat on Discord

melos

This is based on the googleapis.dart repository but instead aimed at supporting Firebase related APIs only. Additionally, this adds support for several unlisted (but discoverable) Firebase APIs that are not listed on the official discovery API that googleapis.dart uses (and is currently limited to) as well as several private APIs (APIs that require an API key to view discovery information).

See ./generated/firebaseapis/README.md for information on all the currently supported APIs.

Usage Example

// Import the APIs you want to use
import 'package:firebaseapis/firebaseremoteconfig/v1.dart' as remote_config;
import 'package:firebaseapis/firebaserules/v1.dart' as firebase_rules;
// Import Auth client
import 'package:googleapis_auth/auth_io.dart' as auth;

// Get an Auth Client
final authClient = await auth.clientViaApplicationDefaultCredentials(scopes: [
  remote_config.FirebaseRemoteConfigApi.cloudPlatformScope,
]);

// Call some APIs
final rc = remote_config.FirebaseRemoteConfigApi(authClient);
final config =
  await rc.projects.getRemoteConfig('projects/<your-project-id>');
print(config.parameters);
print(config.parameters?.values.first.defaultValue);
print(config.parameters?.values.first.description);
print(config.parameters?.values.first.valueType);

final fr = firebase_rules.FirebaseRulesApi(authClient);
final rules =
  await fr.projects.rulesets.list('projects/<your-project-id>');
print(rules.rulesets?.first.name);
print(rules.rulesets?.first.source?.files?.first.content);

Custom Request Headers

Custom request headers can be set by adding to requestHeaders:

import 'package:firebaseapis/src/user_agent.dart';

Future<void> main() async {
  requestHeaders.addAll({
    'cool-header': 'cool-value',
  });
  print(requestHeaders);
}

Contributing

This project uses Melos to manage the project and dependencies.

To install Melos, run the following command from your SSH client:

dart pub global activate melos

Next, at the root of your locally cloned repository bootstrap the projects dependencies:

melos bootstrap

The bootstrap command locally links all dependencies within the project without having to provide manual dependency_overrides. This allows all plugins, examples and tests to build from the local clone project.

You do not need to run flutter pub get once bootstrap has been completed.

Adding a new API

To add a new API and generate library code for it is fairly straightforward;

  1. Add the API to the apis list in ./config.yaml
  2. Run melos run config:download to update the downloaded discovery document JSON files that are in ./discovery.
    • Note: several APIs require an API key to be able to read the discovery information. Set a API_KEY environment variable before running the command to be able to download the discovery documents for these private APIs, e.g. API_KEY=<your-key-here> melos run config:download.
  3. Run melos run config:generate to generate new Dart library code for the API, which outputs to ./generated/firebaseapis.

Maintained by Invertase.

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 2 आइटम

  • _discoveryapis_commons^1.0.0
  • http>=0.13.0 <2.0.0

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट