Structure
WFCollection
public struct WFCollection
Relationships
Conforms To
Decodable
Initializers
init(title:alias:)
public init(title: String, alias: String?)
Creates a basic WFCollection
object.
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
Name | Type | Description |
---|---|---|
title | String |
The title to give the Collection. |
alias | String? |
The alias for the Collection. |
init(from:)
public init(from decoder: Decoder) throws
Creates a WFCollection
object from the server response.
Primarily used by the WFClient
to create a WFCollection
object from the JSON returned by the server.
Parameters
Name | Type | Description |
---|---|---|
decoder | 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?