dartvolt 0.0.2 copy "dartvolt: ^0.0.2" to clipboard
dartvolt: ^0.0.2 copied to clipboard

outdated

Experimental API Wrapper for the REVOLT.chat API including basic HTTP and Websocket functionality.

example/example.dart

import 'package:dartvolt/dartvolt.dart' as dartvolt;

void main() {
    var client = dartvolt.Client(dartvolt.ClientConfig(
        apiUrl: 'https://api.revolt.chat',
        debug: true
    ));

    /// Use existing session credentials.
    /// You can use client.login() in the
    /// future to create a new session,
    /// but this isn't implemented right now. 
    client.useExistingSession(dartvolt.SessionInfo(
        clientId: 'My very epic 26 letter User ID',
        sessionId: 'My equally epic 26 letter Session ID',
        sessionToken: 'My super epic 64 letter Session Secret'
    ));

    /// Listen for the ready event.
    /// Will probably change in the future.
    client.events.on('Ready', null, (ev, context) {
        print('My super epic client logged in!');
    });
}
4
likes
0
pub points
0%
popularity

Publisher

verified publisherjanderedev.xyz

Experimental API Wrapper for the REVOLT.chat API including basic HTTP and Websocket functionality.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

eventify, http, web_socket_channel

More

Packages that depend on dartvolt