WriteFreely Documentation Beta

Structure WFCollection

public struct WFCollection 
WFCollection WFCollection Decodable Decodable WFCollection->Decodable

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

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

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?

style​Sheet

public var styleSheet: String?

is​Public

public var isPublic: Bool?

views

public var views: Int?

email

public var email: String?

url

public var url: String?