Random posts about coding

Mostly blogging about dart.

Google Client Apis New Release 0.4.x

| Comments

The dart-gde team has updated the google client apis to '>=0.4.0'. Along with this change was an update for Google OAuth2 Client to '>=0.3.0'.

The breaking changes for Google OAuth2 Client

  • SystemCache has been removed.
  • GoogleOAuth2.ensureAuthenticated() A much cleaner impl that eliminates the need to pass in a HttpRequest object to authenticate.
  • All dependencies bumped to latest versions.
  • Code refactored.
  • Dead code eliminated.
  • Remove deprecated libraries.
  • Heavy logging removed.

The breaking changes for generated google client apis include

  • Renamed lib/src/{cloud_api.dart -> client_base.dart} lib/src/{cloud_api_console.dart -> console_client.dart} lib/src/{cloud_api_browser.dart -> browser_client.dart}.
  • ClientBase.responseParse(int statusCode, String responseBody) introduced and handles parsing responseBody. responseParse will throw DetailedApiRequestError if the body has an error.
  • Renamed APIRequestException -> APIRequestError.
  • Remove deprecated libraries.

Updating requires a small change in pubspec.yaml

pubspec.yaml
1
2
dependencies:
  google_plus_v1_api: '>=0.4.0'

A small collection of demo examples could be found at dart_api_client_examples.

Full list of available Google client apis on pub.dartlang.org

Comments