DDPMessage

public struct DDPMessage

A struct to parse, encapsulate and facilitate handling of DDP message strings

  • The message’s properties, stored as an NSDictionary

    Declaration

    Swift

    public var json:NSDictionary!
  • Initialize a message struct, with a Json string

    Declaration

    Swift

    public init(message:String)
  • Initialize a message struct, with a dictionary of strings

    Declaration

    Swift

    public init(message:[String:String])
  • Converts an NSDictionary to a JSON string

    Declaration

    Swift

    public static func toString(json:AnyObject) -> String?
  • Returns the DDP message type, of type DDPMessageType enum

    Declaration

    Swift

    public var type:DDPMessageType
  • Returns a boolean value indicating if the message is an error message or not

    Declaration

    Swift

    public var isError:Bool
  • Undocumented

    Declaration

    Swift

    public struct DDPMessage
  • The optional DDP message

    Declaration

    Swift

    public var message:String?
  • The optional DDP session string

    Declaration

    Swift

    public var session:String?
  • The optional DDP version string

    Declaration

    Swift

    public var version:String?
  • The optional DDP support string

    Declaration

    Swift

    public var support:String?
  • id

    The optional DDP message id string

    Declaration

    Swift

    public var id:String?
  • The optional DDP name string

    Declaration

    Swift

    public var name:String?
  • The optional DDP param string

    Declaration

    Swift

    public var params:String?
  • The optional DDP error object

    Declaration

    Swift

    public var error:DDPError?
  • The optional DDP collection name string

    Declaration

    Swift

    public var collection:String?
  • The optional DDP fields dictionary

    Declaration

    Swift

    public var fields:NSDictionary?
  • The optional DDP cleared array. Contains an array of fields that should be removed

    Declaration

    Swift

    public var cleared:[String]?
  • The optional method name

    Declaration

    Swift

    public var method:String?
  • The optional random seed JSON value (an arbitrary client-determined seed for pseudo-random generators)

    Declaration

    Swift

    public var randomSeed:String?
  • The optional result object, containing the result of a method call

    Declaration

    Swift

    public var result:AnyObject?
  • The optional array of ids passed to ‘method’, all of whose writes have been reflected in data messages)

    Declaration

    Swift

    public var methods:[String]?
  • The optional array of id strings passed to ‘sub’ which have sent their initial batch of data

    Declaration

    Swift

    public var subs:[String]?
  • The optional reason given for an error returned from the server

    Declaration

    Swift

    public var reason:String?
  • The optional original error message

    Declaration

    Swift

    public var offendingMessage:String?