dumb_api_dart 1.0.0 copy "dumb_api_dart: ^1.0.0" to clipboard
dumb_api_dart: ^1.0.0 copied to clipboard

api for DUMBMessenger

DUMB Messenger API #

made by debianrose!

Why? #

Just for fun. And for android client

Usage Example #

import 'package:chat_client/chat_client.dart';

// Create client instance
final client = ChatClient(
  baseUrl: 'http://localhost:3000',
  token: 'your-auth-token',
);

// Authentication
final loginResult = await client.login('username', 'password');
if (loginResult.requires2FA) {
  // Handle 2FA
  final verified = await client.verify2FALogin(
    'username', 
    loginResult.sessionId!, 
    '123456'
  );
}

// Send message
final message = await client.sendMessage(
  channel: 'general',
  text: 'Hello World!',
);

// WebSocket for real-time updates
final channel = client.createWebSocketChannel();
channel.stream.listen((data) {
  final message = ChatMessage.fromJson(json.decode(data));
  // Handle incoming message
});
0
likes
0
points
49
downloads

Publisher

unverified uploader

Weekly Downloads

api for DUMBMessenger

Homepage

License

unknown (license)

Dependencies

crypto, http, image, web_socket_channel

More

Packages that depend on dumb_api_dart