FezType

public enum FezType : String, CaseIterable, Codable

The type of FriendlyFez.

  • A closed chat. Participants are set at creation and can’t be changed. No location, start/end time, or capacity.

    Declaration

    Swift

    case closed
  • An open chat. Participants can be added/removed after creation and your UI should make this clear. No location, start/end time, or capacity.

    Declaration

    Swift

    case open
  • Some type of activity.

    Declaration

    Swift

    case activity
  • A dining LFG.

    Declaration

    Swift

    case dining
  • A gaming LFG.

    Declaration

    Swift

    case gaming
  • A general meetup.

    Declaration

    Swift

    case meetup
  • A music-related LFG.

    Declaration

    Swift

    case music
  • Some other type of LFG.

    Declaration

    Swift

    case other
  • A shore excursion LFG.

    Declaration

    Swift

    case shore
  • .label returns consumer-friendly case names.

    Declaration

    Swift

    var label: String { get }
  • For use by the UI layer. Returns whether this fez should be labeled as a Seamail chat or as a LFG or some sort.

    Declaration

    Swift

    var lfgLabel: String { get }
  • This gives us a bit more control than init(rawValue:). Since the strings for FezTypes are part of the API (specifically, they’re URL query values), they should be somewhat abstracted from internal representation. URL Parameters that take a FezType string should use this function to make a FezType from the input.

    Declaration

    Swift

    static func fromAPIString(_ str: String) throws -> FezType