GameServiceConfiguration

@objc public class GameServiceConfiguration: NSObject, Glossy

A data class holding the parameters required to connect to the v5 game service.

  • url

    The base address to connect to the server.

    Declaration

    Swift

    public var url: String = ""
  • A short string identifier for the game.

    Declaration

    Swift

    public var gameId: String = ""
  • A string id provided by scryptkeepers team.

    Declaration

    Swift

    public var skuid: String = ""
  • key

    A string api key provided by scryptkeepers team.

    Declaration

    Swift

    public var key: String = ""
  • A string secret provided by scryptkeepers team.

    Declaration

    Swift

    public var secret: String = ""
  • An array of numbers that define how the service will retry failed requests. The number of entries is how many times it will retry and the numeric value of the entry is how long it will delay before retrying the request.

    Declaration

    Swift

    public var numberOfRetries: [Double] = []
  • Undocumented

    Declaration

    Swift

    public var timeoutPerRequest: Int = defaultTimeoutPerRequest
  • Undocumented

    Declaration

    Swift

    public override init()
  • Undocumented

    Declaration

    Swift

    public init(gameId: String, skuid: String, url: String, secret: String, key: String, retries: [Double])
  • Declaration

    Swift

    required public init?(json: JSON)
  • Compares two configurations and will return true if it is considered a major configuration change.

    A major configuartion change would be a change of any of the following properties: skuid, url, secret, key

    Declaration

    Swift

    public func isMajorConfigurationChange(config: GameServiceConfiguration) -> Bool
  • Returns ture if the configuration is valid.

    A configuration is valid if it has values for all of the following: skuid, url, secret, key

    Declaration

    Swift

    public func isValid() -> Bool
  • Declaration

    Swift

    public func toJSON() -> JSON?