Request Structs
-
structs in this file should only be used by Admin APIs, that is: API calls that require administrator access. For admins to create and edit Annoucements.
See moreDeclaration
Swift
public struct AnnouncementCreateData : Contentextension AnnouncementCreateData: RCFValidatable -
Used to create or update a
FriendlyFez.Required by:
POST /api/v3/fez/createPOST /api/v3/fez/ID/update
See:
See moreFezController.createHandler(_:data:),FezController.updateHandler(_:data:).Declaration
-
Used to upload an image file or refer to an already-uploaded image. Either
filenameorimageshould always be set. If both are set,filenameis ignored andimageis processed and saved with a new name. A more Swift-y way to do this would be an Enum with associated values, except Codable support becomes a pain and makes it difficult to understand what the equivalent JSON struct will look like.Required by:
POST /api/v3/user/imageIncorporated intoPostContentData, which is in turn required by several routes.See
See moreUserController.imageHandler(_:data).Declaration
Swift
struct ImageUploadData : Content, Sendable -
Used to create or update a
ForumPost,Twarrt, orFezPost.Required by:
POST /api/v3/forum/ID/createPOST /api/v3/forum/post/IDPOST /api/v3/forum/post/ID/updatePOST /api/v3/twitarr/createPOST /api/v3/twitarr/ID/replyPOST /api/v3/twitarr/ID/updatePOST /api/v3/fez/ID/post
See
See moreForumController.postUpdateHandler(_:data:).Declaration
-
Used to submit a message with a
Report.Required by:
POST /api/v3/users/ID/reportPOST /api/v3/forum/ID/reportPOST /api/v3/forun/post/ID/report
See
See moreUsersController.reportHandler(_:data:),ForumController.forumReportHandler(_:data:)ForumController.postReportHandler(_:data:).Declaration
Swift
public struct ReportData : Content -
Used to create a new account or sub-account.
Required by:
POST /api/v3/user/createPOST /api/v3/user/add
See
See moreUserController.createHandler(_:data:),UserController.addHandler(_:data:).Declaration
-
Used to change a user’s password. Even when already logged in, users need to provide their current password to set a new password.
Required by:
POST /api/v3/user/passwordSee
See moreUserController.passwordHandler(_:data:).Declaration
-
Used to attempt to recover an account in a forgotten-password type scenario.
Required by:
POST /api/v3/auth/recoverySee
See moreAuthController.recoveryHandler(_:data:).Declaration
-
Used to change a user’s username.
Required by:
POST /api/v3/user/usernameSee
See moreUserController.usernameHandler(_:data:).Declaration
-
Used to verify (register) a created but
.unverifiedprimary account.Required by:
POST /api/v3/user/verifySee
See moreUserController.verifyHandler(_:data:).Declaration
View on GitHub
Request Structs Reference