sharkey library

Functions

createTextNoteForUser(String apiBase, String baseUrl, String apiToken, String visibility, bool localOnly, String reactionAcceptance, bool noExtractMentions, bool noExtractHashtags, bool noExtractEmojis, String note) Future<Map<String, dynamic>>
Attempts to create a text note on the supplied instance. The visibility can be set to "public", "home", "followers" or "direct". The "reactionAcceptance" parameter allows you to set which reactions can be sent. For the other parameters, when in doubt, please read the API documentation here: https://misskey.io/api-doc If the operation succeeds, a success map is returned. If the operation fails, an error map is returned.
deleteNoteForUser(String apiBase, String baseUrl, String apiToken, String noteId) Future<Map<String, dynamic>>
Attempts to delete a note. If the operation succeeds, a success map is returned. If the operation fails, an error map is returned.
fetchJSON(String method, Map<String, dynamic> headers, Map<String, dynamic> payload, String reqUrl) Future<Map<String, dynamic>>
Attempts to retrieve a response of the supplied type and with the other supplied parameters. If this succeeds, the response is returned as a map. If this fails, an error is returned as a map.
followUser(String userName, String server, String apiToken, String baseUrl, String apiBase, bool withReplies) Future<Map<String, dynamic>>
Attempts to follow a user. If the operation succeeds, a success map is returned. If this fails, an error map is returned.
getApiTokenFromEnv(String envVar) String
Attempts to retrieve the value stored in the supplied "envVar" name. If this fails, an empty string is returned.
getUserFollowers(String userName, String server, String baseUrl, String apiBase) Future<Map<String, dynamic>>
Attempts to get a map of users following a user. If this fails, an error map is returned.
getUserFollowing(String userName, String server, String baseUrl, String apiBase) Future<Map<String, dynamic>>
Attempts to get a map of users a user is following. If this fails, an error map is returned.
getUserFromToken(String baseUrl, String apiBase, String apiToken) Future<Map<String, dynamic>>
Attempts to return information on the user owning the provided API token as a map. If the operation fails, an error map is returned.
getUserInfo(String userName, String server, String baseUrl, String apiBase) Future<Map<String, dynamic>>
Attempts to return the information about a user profile as a map. If this fails, an error as a map is returned.
getUserNotes(String userName, String server, String apiBase, String baseUrl) Future<Map<String, dynamic>>
Attempts to retrieve the notes a user has created on the supplied instance as a map. If this fails, an error map is returned.
globalTimeline(String baseUrl, String apiBase, bool withFiles, bool withRenotes, bool withReplies, int noteCount) Future<Map<String, dynamic>>
Attempts to retrieve a map of all notes on the supplied instance and instances federated with it. If this fails, an error map is returned.
instanceTimeline(String baseUrl, String apiBase, bool withFiles, bool withRenotes, bool withReplies, int noteCount) Future<Map<String, dynamic>>
Attempts to retrieve a map of all notes on the supplied instance. If this fails, an error map is returned.
likeNoteForUser(String apiBase, String baseUrl, String apiToken, String noteId, String reaction) Future<Map<String, dynamic>>
Attempts to like a note. If the operation succeeds, a success map is returned. If the operation fails, an error map is returned. You can customize which reaction you want to send.
mentionedTimeline(String apiToken, String baseUrl, String apiBase, int noteCount, bool fromFollowing, String visibility) Future<Map<String, dynamic>>
Attempts to retrieve a map of all notes a user has been mentioned in. If this fails, an error map is returned.
responseIsError(Map<String, dynamic> subject) bool
Checks whether the supplied response map has an "error" key. If this is the case, "true" is returned. If this is not the case, "false" is returned.
searchForUser(String userName, String server, String baseUrl, String apiBase, int resultCount) Future<Map<String, dynamic>>
Attempts to retrieve a map of all search results matching the supplied user's handle. If this fails, an error map is returned.
unfollowUser(String userName, String server, String apiToken, String baseUrl, String apiBase, bool withReplies) Future<Map<String, dynamic>>
Attempts to unfollow a user. If the operation succeeds, a success map is returned. If this fails, an error map is returned.
unlikeNoteForUser(String apiBase, String baseUrl, String apiToken, String noteId, String reaction) Future<Map<String, dynamic>>
Attempts to unlike a note. If the operation succeeds, a success map is returned. If the operation fails, an error map is returned. You can customize which reaction you want to reverse.
userExists(String userName, String server, String baseUrl, String apiBase) Future<bool>
Checks whether the supplied user exists on the given instance. If they do exist, "true" is returned. If they don't exist, "false" is returned.