Option

public struct Option

An option that a user can vote for.

  • The title of the option

    Declaration

    Swift

    public private(set) var name: String
  • The number of points the option has gotten. Only accessable by admin

    Declaration

    Swift

    public private(set) var points: Int?
  • id

    Identifier for the option

    Declaration

    Swift

    public private(set) var id: String
  • The awards this option has earned. Available only for admins or for events with results released

    Declaration

    Swift

    public var awards: [String]?
  • A boolean to indicate if the user is voting for this one

    Declaration

    Swift

    public var isVotedFor: Bool
  • An int to indicate the order (starting at 1 ending at numSelected). Only nescesary if event is ordered

    Declaration

    Swift

    public var voteOrder: Int?
  • Parse the given json object

    Declaration

    Swift

    public static func parse(object: JSON) -> Option?
  • Get the JSON value of this option

    Declaration

    Swift

    public func json() -> JSON