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 : Content
extension AnnouncementCreateData: RCFValidatable
-
Used to create or update a
FriendlyFez
.Required by:
POST /api/v3/fez/create
POST /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
filename
orimage
should always be set. If both are set,filename
is ignored andimage
is 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/image
Incorporated intoPostContentData
, which is in turn required by several routes.See
See moreUserController.imageHandler(_:data)
.Declaration
Swift
public struct ImageUploadData : Content
-
Used to create or update a
ForumPost
,Twarrt
, orFezPost
.Required by:
POST /api/v3/forum/ID/create
POST /api/v3/forum/post/ID
POST /api/v3/forum/post/ID/update
POST /api/v3/twitarr/create
POST /api/v3/twitarr/ID/reply
POST /api/v3/twitarr/ID/update
POST /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/report
POST /api/v3/forum/ID/report
POST /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/create
POST /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/password
See
See moreUserController.passwordHandler(_:data:)
.Declaration
-
Used to attempt to recover an account in a forgotten-password type scenario.
Required by:
POST /api/v3/auth/recovery
See
See moreAuthController.recoveryHandler(_:data:)
.Declaration
-
Used to change a user’s username.
Required by:
POST /api/v3/user/username
See
See moreUserController.usernameHandler(_:data:)
.Declaration
-
Used to verify (register) a created but
.unverified
primary account.Required by:
POST /api/v3/user/verify
See
See moreUserController.verifyHandler(_:data:)
.Declaration