Skip to content
Snippets Groups Projects
Select Git revision
  • 4fef1f7f786291651afdac3728743e40d48a0604
  • main default protected
  • development
  • integration
  • v1.1.5
  • v1.1.4
  • v1.1.3
  • v1.1.2
  • v1.1.1
  • v1.1.0
  • v1.0.0
11 results

BroadcastReport.swift

Blame
  • BroadcastReport.swift 560 B
    import Foundation
    
    public struct BroadcastReport: Equatable {
      public init(
        roundId: Int,
        ephId: [Int]
      ) {
        self.roundId = roundId
        self.ephId = ephId
      }
    
      public var roundId: Int
      public var ephId: [Int]
    }
    
    extension BroadcastReport: Codable {
      enum CodingKeys: String, CodingKey {
        case roundId = "RoundID"
        case ephId = "EphID"
      }
    
      public static func decode(_ data: Data) throws -> Self {
        try JSONDecoder().decode(Self.self, from: data)
      }
    
      public func encode() throws -> Data {
        try JSONEncoder().encode(self)
      }
    }