Accounts
public struct Accounts
Undocumented
-
Fetches an account.
Parameters
idThe account id.
Return Value
Request for
Account. -
Gets the current user.
Return Value
Request for
Account. -
Updates the current user.
Declaration
Swift
public static func updateCurrentUser(displayName: String? = nil, note: String? = nil, avatar: MediaAttachment? = nil, header: MediaAttachment? = nil) -> Request<Account>Parameters
displayNameThe name to display in the user’s profile.
noteA new biography for the user.
avatarThe media attachment to display as the user’s avatar.
headerThe media attachment to display as the user’s header image.
Return Value
Request for
Account. -
Gets an account’s followers.
Declaration
Swift
public static func followers(id: String, range: RequestRange = .default) -> Request<[Account]>Parameters
idThe account id.
rangeThe bounds used when requesting data from Mastodon.
Return Value
Request for
[Account]. -
Gets who account is following.
Declaration
Swift
public static func following(id: String, range: RequestRange = .default) -> Request<[Account]>Parameters
idThe account id
rangeThe bounds used when requesting data from Mastodon.
Return Value
Request for
[Account]. -
Gets an account’s statuses.
Declaration
Swift
public static func statuses(id: String, mediaOnly: Bool? = nil, pinnedOnly: Bool? = nil, excludeReplies: Bool? = nil, range: RequestRange = .default) -> Request<[Status]>Parameters
idThe account id.
mediaOnlyOnly return statuses that have media attachments.
pinnedOnlyOnly return statuses that have been pinned.
excludeRepliesSkip statuses that reply to other statuses.
rangeThe bounds used when requesting data from Mastodon.
Return Value
Request for
[Status]. -
Follows an account.
Parameters
idThe account id.
Return Value
Request for
Account. -
Unfollow an account.
Parameters
idThe account id.
Return Value
Request for
Account. -
Follows a remote user:.
Parameters
uriThe ‘username@domain’ of the remote user to follow.
Return Value
Request for
Account. -
Blocks an account.
Declaration
Swift
public static func block(id: String) -> Request<Relationship>Parameters
idThe account id.
Return Value
Request for
Relationship. -
Unblocks an account.
Declaration
Swift
public static func unblock(id: String) -> Request<Relationship>Parameters
idThe account id.
Return Value
Request for
Relationship. -
Mutes an account.
Declaration
Swift
public static func mute(id: String) -> Request<Relationship>Parameters
idThe account id.
Return Value
Request for
Relationship. -
Unmutes an account.
Declaration
Swift
public static func unmute(id: String) -> Request<Relationship>Parameters
idThe account id.
Return Value
Request for
Relationship. -
Gets an account’s relationships.
Declaration
Swift
public static func relationships(ids: [String]) -> Request<[Relationship]>Parameters
idsThe account’s ids.
Return Value
Request for
[Relationship]. -
Searches for accounts.
Declaration
Parameters
queryWhat to search for.
limitMaximum number of matching accounts to return (default: 40).
followingLimit the search to following (default: false).
Return Value
Request for
[Account].
View on GitHub
Install in Dash
Accounts Structure Reference