mastodon_dart 0.1.5 copy "mastodon_dart: ^0.1.5" to clipboard
mastodon_dart: ^0.1.5 copied to clipboard

outdated

The official Dart library for accessing the Mastodon API. Use in conjunction with mastodon_flutter to build a Flutter Mastodon app.

example/lib/main.dart

import 'dart:io';

import 'package:mastodon_dart/mastodon_dart.dart';
import 'package:web_socket_channel/io.dart';

main() async {
  final baseUrl = Uri.parse(Platform.environment["BASE_URL"]);
  final token = Platform.environment["TOKEN"];

  final mastodon = Mastodon(
    baseUrl,
    websocketFactory: (uri) => IOWebSocketChannel.connect(uri),
  )..token = token;

  mastodon.publicTimelineStream().listen(print);
}
7
likes
0
pub points
10%
popularity

Publisher

unverified uploader

The official Dart library for accessing the Mastodon API. Use in conjunction with mastodon_flutter to build a Flutter Mastodon app.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

http, json_annotation, rxdart, web_socket_channel

More

Packages that depend on mastodon_dart