firebaseapis パッケージは、API の発見サービスを介して Google API にアクセスするための自動生成されたクライアントライブラリを提供します。Flutter および Dart 向けに構築されており、公式の API 説明から型安全な API を生成することで、Firebase および他の Google サービスとのシームレスな統合を可能にします。これにより、開発者は Android、iOS、Web、macOS、Windows、Linux プラットフォーム上のアプリから、Drive、カレンダー、クラウドストレージなど Google の広大なエコシステムと直接やり取りできます。このパッケージは invertase.io によってメンテナンスされており、現代的な Flutter 開発ワークフローをサポートしています。
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).
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;
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.
Run melos run config:generate to generate new Dart library code for the API, which outputs to ./generated/firebaseapis.