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 more

    Declaration

    Swift

    public struct AnnouncementCreateData : Content
    extension AnnouncementCreateData: RCFValidatable
  • Used to update the Event database.

    Required by: POST /api/v3/events/update

    See EventController.eventsUpdateHandler(_:data:).

    See more

    Declaration

    Swift

    public struct EventsUpdateData : Content
  • Used to create or update a FriendlyFez.

    Required by:

    • POST /api/v3/fez/create
    • POST /api/v3/fez/ID/update

    See: FezController.createHandler(_:data:), FezController.updateHandler(_:data:).

    See more

    Declaration

    Swift

    public struct FezContentData : Content
    extension FezContentData: RCFValidatable
  • Used to create a new Forum.

    Required by: POST /api/v3/forum/categories/ID/create

    See ForumController.forumCreateHandler(_:data:).

    See more

    Declaration

    Swift

    public struct ForumCreateData : Content
    extension ForumCreateData: RCFValidatable
  • Used to upload an image file or refer to an already-uploaded image. Either filename or image should always be set. If both are set, filename is ignored and image 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 into PostContentData, which is in turn required by several routes.

    See UserController.imageHandler(_:data).

    See more

    Declaration

    Swift

    public struct ImageUploadData : Content
  • Used to create a UserNote when viewing a user’s profile. Also used to create a Karaoke song log entry.

    Required by:

    • /api/v3/users/:userID/note
    • /api/v3/karaoke/:songID/logperformance

    See UsersController.noteCreateHandler(_:data:).

    See more

    Declaration

    Swift

    public struct NoteCreateData : Content
    extension NoteCreateData: RCFValidatable
  • Used to create or update a ForumPost, Twarrt, or FezPost.

    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 ForumController.postUpdateHandler(_:data:).

    See more

    Declaration

    Swift

    public struct PostContentData : Content
    extension PostContentData: RCFValidatable
  • 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 UsersController.reportHandler(_:data:), ForumController.forumReportHandler(_:data:) ForumController.postReportHandler(_:data:).

    See more

    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 UserController.createHandler(_:data:), UserController.addHandler(_:data:).

    See more

    Declaration

    Swift

    public struct UserCreateData : Content
    extension UserCreateData: RCFValidatable
  • 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 UserController.passwordHandler(_:data:).

    See more

    Declaration

    Swift

    public struct UserPasswordData : Content
    extension UserPasswordData: RCFValidatable
  • Used to attempt to recover an account in a forgotten-password type scenario.

    Required by: POST /api/v3/auth/recovery

    See AuthController.recoveryHandler(_:data:).

    See more

    Declaration

    Swift

    public struct UserRecoveryData : Content
    extension UserRecoveryData: RCFValidatable
  • Used to change a user’s username.

    Required by: POST /api/v3/user/username

    See UserController.usernameHandler(_:data:).

    See more

    Declaration

    Swift

    public struct UserUsernameData : Content
    extension UserUsernameData: RCFValidatable
  • Used to verify (register) a created but .unverified primary account.

    Required by: POST /api/v3/user/verify

    See UserController.verifyHandler(_:data:).

    See more

    Declaration

    Swift

    public struct UserVerifyData : Content
    extension UserVerifyData: RCFValidatable