From 224d9adf589bf765b287ee07f857c15040f686f1 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 24 Aug 2026 16:53:56 -0700 Subject: [PATCH 1/2] chore: remove obsolete examples directory --- examples/bin/language_api.dart | 63 ---------------------------------- examples/pubspec.yaml | 29 ---------------- 2 files changed, 92 deletions(-) delete mode 100644 examples/bin/language_api.dart delete mode 100644 examples/pubspec.yaml diff --git a/examples/bin/language_api.dart b/examples/bin/language_api.dart deleted file mode 100644 index ae2fab2c..00000000 --- a/examples/bin/language_api.dart +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// A simple end-to-end example showing an API call through the -/// `google_cloud_language` package with authentication via -/// `package:googleapis_auth`. -library; - -import 'dart:io'; - -import 'package:google_cloud_language_v2/language.dart'; -import 'package:google_cloud_rpc/rpc.dart'; -import 'package:googleapis_auth/auth_io.dart' as auth; - -void main(List args) async { - if (args.isEmpty) { - print('usage: dart bin/language_api.dart '); - exit(1); - } - - final apiKey = args[0]; - - final client = auth.clientViaApiKey(apiKey); - final service = LanguageService(client: client); - final document = Document( - content: 'Hello, world!', - type: Document_Type.plainText, - ); - - try { - final result = await service.analyzeSentiment( - AnalyzeSentimentRequest(document: document), - ); - - print('result: $result'); - print('documentSentiment: ${result.documentSentiment}'); - - for (final sentence in result.sentences) { - print(''); - print('sentence:'); - print(' text: ${sentence.text}'); - print(' sentiment: ${sentence.sentiment}'); - } - } on Status catch (error) { - print('error: $error'); - for (final detail in error.detailsAsMessages) { - print(' detail: $detail'); - } - } - - client.close(); -} diff --git a/examples/pubspec.yaml b/examples/pubspec.yaml deleted file mode 100644 index f02ba749..00000000 --- a/examples/pubspec.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: examples -description: Various examples of Google Cloud client usage. - -publish_to: none - -environment: - sdk: ^3.9.0 - -resolution: workspace - -dependencies: - google_cloud_language_v2: any - google_cloud_rpc: any - googleapis_auth: ^2.0.0 - From f468eb87335a33018c9c425096d2c7f65f9d8c82 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 24 Aug 2026 16:56:20 -0700 Subject: [PATCH 2/2] Update pubspec.yaml --- pubspec.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 1d764783..b78d2ccb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -19,7 +19,6 @@ environment: sdk: ^3.9.0 workspace: - - examples - generated/google_cloud_ai_generativelanguage_v1beta - generated/google_cloud_aiplatform_v1beta1 - generated/google_cloud_api