Skip to content

Instantly share code, notes, and snippets.

@devoncarew
Last active May 8, 2025 20:29
Show Gist options
  • Save devoncarew/d195d016133a6f7378cc708dc53bb6a7 to your computer and use it in GitHub Desktop.
Save devoncarew/d195d016133a6f7378cc708dc53bb6a7 to your computer and use it in GitHub Desktop.

Google API client for the Cloud Functions API.

Manages lightweight user-provided functions executed in response to events.

For additional documentation, see https://cloud.google.com/functions.

Getting started

To get started, create an instance of CloudFunctions:

import 'package:google_api_cloudfunctions_v2/cloudfunctions.dart';
import 'package:googleapis_auth/auth_io.dart' as auth;

void main() {
  final httpClient = auth.clientViaApplicationDefaultCredentials(
    scopes: CloudFunctions.scopes,
  );
  final cloudfunctions = CloudFunctions(httpClient);

  // Perform operations on cloudfunctions...

  cloudfunctions.close();
}

Available APIs

The APIs available from a CloudFunctions instance are:

Path Resource
projects [ProjectsResource]
projects.locations [ProjectsLocationsResource]
projects.locations.functions [ProjectsLocationsFunctionsResource]
projects.locations.operations [ProjectsLocationsOperationsResource]
projects.locations.runtimes [ProjectsLocationsRuntimesResource]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment