MastodonClient class

Main entry point for the Mastodon API client.

Each API category is exposed as a property and used as a namespace.

final client = MastodonClient(
  baseUrl: 'https://mastodon.social',
  accessToken: 'your_token',
);

final info = await client.instance.fetch();

Constructors

MastodonClient({required String baseUrl, String? accessToken, bool enableLog = true, Logger? logger})
Creates a MastodonClient.

Properties

accounts → AccountsApi
Account information API.
no setter
adminAccounts → AdminAccountsApi
Admin account management API.
no setter
adminCanonicalEmailBlocks → AdminCanonicalEmailBlocksApi
Admin canonical email block management API.
no setter
adminDimensions → AdminDimensionsApi
Admin dimensions (dimensional data) API.
no setter
adminDomainAllows → AdminDomainAllowsApi
Admin domain allow management API.
no setter
adminDomainBlocks → AdminDomainBlocksApi
Admin domain block management API.
no setter
adminEmailDomainBlocks → AdminEmailDomainBlocksApi
Admin email domain block management API.
no setter
adminIpBlocks → AdminIpBlocksApi
Admin IP block management API.
no setter
adminMeasures → AdminMeasuresApi
Admin measures (quantitative data) API.
no setter
adminReports → AdminReportsApi
Admin report management API.
no setter
adminRetention → AdminRetentionApi
Admin retention API.
no setter
adminTags → AdminTagsApi
no setter
adminTrends → AdminTrendsApi
Admin trends API.
no setter
announcements → AnnouncementsApi
Server announcements API.
no setter
apps → AppsApi
OAuth application registration and verification API.
no setter
asyncRefreshes → AsyncRefreshesApi
Async refresh status checking API (experimental).
no setter
blocks → BlocksApi
Blocked accounts listing API.
no setter
bookmarks → BookmarksApi
Bookmarked statuses listing API.
no setter
conversations → ConversationsApi
Direct message conversations API.
no setter
customEmojis → CustomEmojisApi
Custom emoji API.
no setter
directory → DirectoryApi
Profile directory API.
no setter
domainBlocks → DomainBlocksApi
User-level domain block management API.
no setter
emails → EmailsApi
Email confirmation API.
no setter
endorsements → EndorsementsApi
Featured accounts (endorsements) listing API.
no setter
favourites → FavouritesApi
Favourited statuses listing API.
no setter
featuredTags → FeaturedTagsApi
Featured tags management API.
no setter
filters → FiltersApi
Filters API (v2 + v1 deprecated methods).
no setter
followedTags → FollowedTagsApi
Followed hashtags listing API.
no setter
followRequests → FollowRequestsApi
Follow request management API.
no setter
groupedNotifications → GroupedNotificationsApi
Grouped notifications API (v2).
no setter
hashCode int
The hash code for this object.
no setterinherited
health → HealthApi
Server health check API.
no setter
instance → InstanceApi
Instance information API.
no setter
lists → ListsApi
List creation and management API.
no setter
markers → MarkersApi
Timeline read position markers API.
no setter
media → MediaApi
Media upload API.
no setter
mutes → MutesApi
Muted accounts listing API.
no setter
notifications → NotificationsApi
Notifications API.
no setter
oauth → OAuthApi
OAuth token operations API.
no setter
oembed → OEmbedApi
OEmbed information retrieval API.
no setter
polls → PollsApi
Polls API.
no setter
preferences → PreferencesApi
User preferences retrieval API.
no setter
profile → ProfileApi
Profile image management API.
no setter
proofs → ProofsApi
Identity proofs API.
no setter
push → PushApi
Web Push notification subscription API.
no setter
reports → ReportsApi
Reports API.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scheduledStatuses → ScheduledStatusesApi
Scheduled statuses management API.
no setter
Search API.
no setter
statuses → StatusesApi
Statuses API.
no setter
suggestions → SuggestionsApi
Follow suggestions API.
no setter
tags → TagsApi
Hashtag information retrieval and follow operations API.
no setter
timelines → TimelinesApi
Timelines API.
no setter
Trends (tags, statuses, and links) API.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited