MicroKaraokeController

struct MicroKaraokeController : APIRouteCollection

Methods for accessing the list of boardgames available in the onboard Games Library.

  • Required. Registers routes to the incoming router.

    Declaration

    Swift

    func registerRoutes(_ app: Application) throws
  • POST /api/v3/microkaraoke/offer

    Requests the server to generate an offer packet for a micro karaoke recording. The offer packet has information about the song to be sung, the particular lyric to be sung, and the audio files for the sound cues to be used.

    This method is a POST because it’s non-idempotent. There is no post data sent to the server, although it requires a logged-in user.

    Throws

    A 5xx response should be reported as a likely bug, please and thank you.

    Declaration

    Swift

    func retrieveMicroKaraokeOffer(_ req: Request) async throws -> MicroKaraokeOfferPacket

    Return Value

    MicroKaraokeOfferPacket describing the song and lyric.

  • POST /api/v3/microkaraoke/recording

    Uploads a video recording containing a person singing the snippet of a song given by the offer.

    Throws

    A 5xx response should be reported as a likely bug, please and thank you.

    Declaration

    Swift

    func uploadMicroKaraokeRecording(_ req: Request) async throws -> HTTPStatus

    Parameters

    recordingData

    MicroKaraokeRecordingData in request body

    Return Value

    MicroKaraokeOfferPacket describing the song and lyric.

  • GET /api/v3/microkaraoke/songlist

    Retuns the list of songs that can be viewed. If the user is a moderator, this list includes songs that are complete but need mod approval.

    Throws

    A 5xx response should be reported as a likely bug, please and thank you.

    Declaration

    Swift

    func getCompletedSongList(_ req: Request) async throws -> [MicroKaraokeCompletedSong]

    Return Value

    [MicroKaraokeCompletedSong] with info on all the completed songs that can be viewed.

  • getSongManifest(_:) Asynchronous

    GET /api/v3/microkaraoke/song/:song_id

    Throws

    A 5xx response should be reported as a likely bug, please and thank you.

    Declaration

    Swift

    func getSongManifest(_ req: Request) async throws -> MicroKaraokeSongManifest

    Parameters

    song_id

    The song to get a manifest for.

    Return Value

    MicroKaraokeSongManifest with a list of URLs to all the video clips that make up the song, in order.

  • getUserVideoClip(_:) Asynchronous

    GET /api/v3/microkaraoke/video/:filename

    Gets a user-uploaded karaoke snippet video. This downloads the actual video file

    Throws

    A 5xx response should be reported as a likely bug, please and thank you.

    Declaration

    Swift

    func getUserVideoClip(_ req: Request) async throws -> Response

    Return Value

    Response .

Utilities