1.5 KiB
1.5 KiB
WFCollection
public struct WFCollection
Inheritance
Decodable
Initializers
init(title:alias:)
Creates a basic WFCollection
object.
public init(title: String, alias: String?)
This initializer creates a bare-minimum WFCollection
object for sending to the server; use the decoder-based
initializer to populate its other properties from the server response.
If no alias
parameter is provided, one will be generated by the server.
Parameters
- title: The title to give the Collection.
- alias: The alias for the Collection.
init(from:)
Creates a WFCollection
object from the server response.
public init(from decoder: Decoder) throws
Primarily used by the WFClient
to create a WFCollection
object from the JSON returned by the server.
Parameters
- decoder: The decoder to use for translating the server response to a Swift object.
Throws
Error thrown by the try
attempt when decoding any given property.
Properties
alias
public var alias: String?
title
public var title: String
description
public var description: String?
styleSheet
public var styleSheet: String?
isPublic
public var isPublic: Bool?
views
public var views: Int?
email
public var email: String?
url
public var url: String?