-
Declaration
Swift
func registerRoutes(_ app: Application) throws
-
userAvatarHandler(_:
Asynchronous) GET /avatar/full/ID GET /avatar/thumb/ID
Gets a user’s avatar image. Calls through to
/api/v3/image/user/SIZE/ID
, and, if called with session credentials, will pass through the creds (which mostly affects quarantined users and moderators).Declaration
Swift
func userAvatarHandler(_ req: Request) async throws -> Response
-
selfProfilePageHandler(_:
Asynchronous) Declaration
Swift
func selfProfilePageHandler(_ req: Request) async throws -> View
-
userProfilePageHandler(_:
Asynchronous) Declaration
Swift
func userProfilePageHandler(_ req: Request) async throws -> View
-
usernameProfilePageHandler(_:
Asynchronous) Declaration
Swift
func usernameProfilePageHandler(_ req: Request) async throws -> View
-
blocksPageHandler(_:
Asynchronous) Declaration
Swift
func blocksPageHandler(_ req: Request) async throws -> View
-
favoritesPageHandler(_:
Asynchronous) Declaration
Swift
func favoritesPageHandler(_ req: Request) async throws -> View
-
blockUserPostHandler(_:
Asynchronous) Declaration
Swift
func blockUserPostHandler(_ req: Request) async throws -> HTTPStatus
-
unblockUserPostHandler(_:
Asynchronous) Declaration
Swift
func unblockUserPostHandler(_ req: Request) async throws -> HTTPStatus
-
muteUserPostHandler(_:
Asynchronous) Declaration
Swift
func muteUserPostHandler(_ req: Request) async throws -> HTTPStatus
-
unmuteUserPostHandler(_:
Asynchronous) Declaration
Swift
func unmuteUserPostHandler(_ req: Request) async throws -> HTTPStatus
-
favoriteUserHandler(_:
Asynchronous) Declaration
Swift
func favoriteUserHandler(_ req: Request) async throws -> HTTPStatus
-
unfavoriteUserHandler(_:
Asynchronous) Declaration
Swift
func unfavoriteUserHandler(_ req: Request) async throws -> HTTPStatus
-
alertMuteWordsPageHandler(_:
Asynchronous) Declaration
Swift
func alertMuteWordsPageHandler(_ req: Request) async throws -> View
-
addAlertwordPostHandler(_:
Asynchronous) Declaration
Swift
func addAlertwordPostHandler(_ req: Request) async throws -> HTTPStatus
-
addMutewordPostHandler(_:
Asynchronous) Declaration
Swift
func addMutewordPostHandler(_ req: Request) async throws -> HTTPStatus
-
removeAlertwordPostHandler(_:
Asynchronous) Declaration
Swift
func removeAlertwordPostHandler(_ req: Request) async throws -> HTTPStatus
-
removeMutewordPostHandler(_:
Asynchronous) Declaration
Swift
func removeMutewordPostHandler(_ req: Request) async throws -> HTTPStatus
-
selfProfileEditPageHandler(_:
Asynchronous) Declaration
Swift
func selfProfileEditPageHandler(_ req: Request) async throws -> View
-
userProfileEditPageHandler(_:
Asynchronous) Declaration
Swift
func userProfileEditPageHandler(_ req: Request) async throws -> View
-
userProfileEditPostHandler(_:
Asynchronous) Declaration
Swift
func userProfileEditPostHandler(_ req: Request) async throws -> HTTPStatus
-
selfUsernameEditPageHandler(_:
Asynchronous) Declaration
Swift
func selfUsernameEditPageHandler(_ req: Request) async throws -> View
-
modUsernameEditPageHandler(_:
Asynchronous) Declaration
Swift
func modUsernameEditPageHandler(_ req: Request) async throws -> View
-
usernameEditPostHandler(_:
Asynchronous) Declaration
Swift
func usernameEditPostHandler(_ req: Request) async throws -> HTTPStatus
-
userNotePostHandler(_:
Asynchronous) Declaration
Swift
func userNotePostHandler(_ req: Request) async throws -> HTTPStatus
-
profileReportPageHandler(_:
Asynchronous) GET /profile/report/ID
Reports content in a user’s profile, either the profile text fields or the avatar image. NOTE: This isn’t reporting the user, you can’t report users directly, just content they create.
Declaration
Swift
func profileReportPageHandler(_ req: Request) async throws -> View
-
profileReportPostHandler(_:
Asynchronous) POST /profile/report/ID
Declaration
Swift
func profileReportPostHandler(_ req: Request) async throws -> HTTPStatus
-
getShutternautsHandler(_:
Asynchronous) Declaration
Swift
func getShutternautsHandler(_ req: Request) async throws -> View
-
addShutternautHandler(_:
Asynchronous) POST /userrole/shutternaut/add/:user_id
Adds the given role to the given user’s role list. Caller must have the Shutternaut Manager role. Currently limited to adding the ‘shutternaut’ role.
Throws
badRequest if the target user already has the role.Declaration
Swift
func addShutternautHandler(_ req: Request) async throws -> HTTPStatus
Return Value
200 OK if the user now has the given role.
-
removeShutternautHandler(_:
Asynchronous) POST /userrole/shutternaut/remove/:user_id
Removes the given role from the target user’s role list. Caller must have the Shutternaut Manager role. Currently limited to removing the ‘shutternaut’ role.
Declaration
Swift
func removeShutternautHandler(_ req: Request) async throws -> HTTPStatus
Return Value
200 OK if the user was demoted successfully.
-
directoryPageHandler(_:
Asynchronous) GET /directory
Render a page to search for a users profile. Requires at least two characters of the username. Doesn’t return a whole list of users for privacy reasons.
See moreDeclaration
Swift
func directoryPageHandler(_ req: Request) async throws -> View