Mastodon class Null safety
Simple API to allow access to a Mastodon server.
Constructors
- Mastodon({String clientId = '', String clientSecret = '', String accessToken = '', String apiBaseUrl = _defaultBaseUrl, bool debug = false, String ratelimitMethod = 'wait', num ratelimitPaceFactor = 1.1, int requestTimeout = _defaultTimeout, String credentials = ''})
- Default constructor that gives full access.
- Mastodon.usingAccessToken(String accessToken, {String instance = _defaultBaseUrl})
-
Easiest way to create the server (if you have your token already).
factory
Properties
- accessToken ↔ String
-
OAuth generated access token.
read / write
- apiBaseUrl ↔ String
-
Base URL for the wanted Mastodon server.
read / write
- clientId ↔ String
-
OAuth id.
read / write
- clientSecret ↔ String
-
OAuth client secret.
read / write
- debug ↔ bool
-
Set to
true
to get some simple /debug/ messages.read / write - hashCode → int
-
The hash code for this object.
read-only, inherited
- ratelimitMethod ↔ String
-
Determine what to do in case of server throttling.
read / write
- ratelimitPaceFactor ↔ num
-
Timing for rate-limiting.
read / write
- requestTimeout ↔ int
-
Request timeout.
read / write
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
logIn(
[String username = "", String password = "", String code = '', String redirectUri = 'urn:ietf:wg:oauth:2.0:oob', String refreshToken = '', List< String> scopes = const <String>['read', 'write', 'follow'], String toFile = '']) → dynamic - Use supplied credentials to generate an OAuth authorisation code. Use at your own risk :-(
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited