dart_sdk 1.0.0
dart_sdk: ^1.0.0 copied to clipboard
A comprehensive Dart SDK for interacting with the V6R API, providing type-safe access to projects, repositories, tickets, and agentic capabilities.
example/dart_sdk_example.dart
import 'package:dart_sdk/src/client/v6r_client.dart';
import 'package:microsoft_kiota_bundle/microsoft_kiota_bundle.dart';
import 'dart:convert';
void main() async {
String username = "user";
String password = "pass";
String basicAuth =
'Basic ' + base64.encode(utf8.encode('$username:$password'));
// Create authentication provider with Basic Auth header
var authenticationProvider = AnonymousAuthenticationProvider();
// Create request adapter with correct base URL
var requestAdapter = DefaultRequestAdapter(
authProvider: authenticationProvider,
);
requestAdapter.baseUrl = 'http://localhost:8888';
// Create client
var client = V6rClient(requestAdapter);
// Make login call with Basic Auth header
var resp = await client.auth.login.getAsync((requestConfiguration) {
requestConfiguration.headers['Authorization'] = {basicAuth};
});
print(resp);
}