Frage

When working with dart, you stumble upon a few generated libraries. There is a whole GitHub group with a collections of those: https://github.com/dart-google-apis

I have not yet figured out how these libraries are generated? Are they compiled from another language? Which language? And which compiler is used?

War es hilfreich?

Lösung

Most of Google's external APIs are described in JSON document by an API called the Discovery Service. The document is called the discovery document and provides enough information to generate a client API that can represent the APIs resources as objects and can connect over HTTP to make calls. The Dart libraries you linked to were generated this way.

You can read about the Discovery Service here: https://developers.google.com/discovery/v1/using

And the generator that those libraries used is here: https://github.com/dart-gde/discovery_api_dart_client_generator

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top