volorio_server 0.2.2
volorio_server: ^0.2.2 copied to clipboard
Backend-only Volorio REST client for creating RTC sessions and sending heartbeats.
example/main.dart
import 'dart:io';
import 'package:volorio_core/volorio_core.dart';
import 'package:volorio_server/volorio_server.dart';
Future<void> main() async {
final apiKey = Platform.environment['VOLORIO_API_KEY'];
if (apiKey == null || apiKey.isEmpty) {
print('Set VOLORIO_API_KEY before running this example.');
return;
}
final client = VolorioServerClient(
apiBaseUrl: 'https://api.volor.io',
apiKey: apiKey,
);
final session = await client.createRoomSession(
const CreateVolorioRoomSessionInput(
clientId: 'app_example',
projectId: 'proj_example',
roomId: 'audio-party-example',
identity: 'server-user-example',
quality: VolorioMediaQuality.voice,
products: [VolorioProductId.rtcVoice],
),
);
print(session.sessionId);
}