ground_control_client 0.11.0 copy "ground_control_client: ^0.11.0" to clipboard
ground_control_client: ^0.11.0 copied to clipboard

A client library for the Serverpod Ground Control API. Used to manage Serverpod Cloud projects.

example/main.dart

import 'package:ground_control_client/ground_control_client.dart';

// This is the URL to the server and should be replaced with the actual URL to
// the server.
var url = 'http://localhost:8080/';

Future<void> main() async {
  var client = Client(
    url,
    authenticationKeyManager: _SimpleAuthenticationKeyManager(),
  );

  client.close();
}

// Simple implementation for managing authentication keys.
class _SimpleAuthenticationKeyManager extends AuthenticationKeyManager {
  String? _key;

  @override
  Future<String?> get() async {
    return _key;
  }

  @override
  Future<void> put(String key) async {
    _key = key;
  }

  @override
  Future<void> remove() async {
    _key = null;
  }
}
1
likes
150
points
333
downloads

Publisher

verified publisherserverpod.dev

Weekly Downloads

A client library for the Serverpod Ground Control API. Used to manage Serverpod Cloud projects.

Homepage
Repository (GitHub)
View/report issues

Topics

#api #client

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

dio, http, mocktail, serverpod_auth_bridge_client, serverpod_auth_client, serverpod_auth_idp_client, serverpod_auth_migration_client, serverpod_client

More

Packages that depend on ground_control_client