MastodonClient constructor

MastodonClient({
  1. required String baseUrl,
  2. String? accessToken,
  3. bool enableLog = true,
  4. Logger? logger,
})

Creates a MastodonClient.

baseUrl must be the host URL including the scheme (e.g. https://mastodon.social). accessToken can be omitted when only using endpoints that do not require authentication. Set enableLog to false to disable HTTP log output, or pass a custom logger to redirect log output to a different destination.

Implementation

MastodonClient({
  required String baseUrl,
  String? accessToken,
  bool enableLog = true,
  Logger? logger,
}) : _http = MastodonHttpClient(
       baseUrl: baseUrl,
       accessToken: accessToken,
       enableLog: enableLog,
       logger: logger,
     );