255 lines
9.5 KiB
HTML
255 lines
9.5 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>WriteFreely - WFCollection</title>
|
||
<link rel="stylesheet" type="text/css" href="/all.css" media="all" />
|
||
</head>
|
||
<body>
|
||
<header>
|
||
<a href="/">
|
||
<strong>
|
||
WriteFreely
|
||
</strong>
|
||
<span>Documentation</span>
|
||
</a>
|
||
<sup>Beta</sup>
|
||
</header>
|
||
|
||
<!--
|
||
<form class="search">
|
||
<input type="search" placeholder="Search" />
|
||
</form>
|
||
-->
|
||
|
||
<nav>
|
||
<div class="wrapper">
|
||
<h2>On This Page</h2>
|
||
<ol><li><a href="#relationships">Relationships</a><ul><li><a href="#relationships">Conforms To</a></li></ul></li><li><a href="#initializers">Initializers</a><ul><li class="initializer"><a href="#wfcollection.init(title:alias:)">init(title:alias:)</a></li><li class="initializer"><a href="#wfcollection.init(from:)">init(from:)</a></li></ul></li><li><a href="#properties">Properties</a><ul><li class="variable"><a href="#wfcollection.alias">alias</a></li><li class="variable"><a href="#wfcollection.title">title</a></li><li class="variable"><a href="#wfcollection.description">description</a></li><li class="variable"><a href="#wfcollection.stylesheet">styleSheet</a></li><li class="variable"><a href="#wfcollection.ispublic">isPublic</a></li><li class="variable"><a href="#wfcollection.views">views</a></li><li class="variable"><a href="#wfcollection.email">email</a></li><li class="variable"><a href="#wfcollection.url">url</a></li></ul></li></ol>
|
||
</div>
|
||
</nav>
|
||
|
||
<main>
|
||
<article>
|
||
<h1>
|
||
<small>Structure</small>
|
||
<code class="name">WFCollection</code>
|
||
</h1>
|
||
|
||
<div class="declaration">
|
||
<pre class="highlight"><code><span class="keyword">public</span> <span class="keyword">struct</span> <span class="type">WFCollection</span> </code></pre>
|
||
</div>
|
||
<section id="relationships">
|
||
<h2 hidden>Relationships</h2>
|
||
<figure>
|
||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||
<!-- Generated by graphviz version 2.47.1 (20210417.1919)
|
||
-->
|
||
<!-- Pages: 1 -->
|
||
<svg width="872pt" height="116pt"
|
||
viewBox="0.00 0.00 872.00 116.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 112)">
|
||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-112 868,-112 868,4 -4,4"/>
|
||
<!-- WFCollection -->
|
||
<g id="node1" class="node structure current">
|
||
<title>WFCollection</title>
|
||
<g id="a_node1"><a xlink:href="/WFCollection" xlink:title="WFCollection">
|
||
<path fill="none" stroke="black" stroke-width="3" d="M528,-108C528,-108 336,-108 336,-108 330,-108 324,-102 324,-96 324,-96 324,-84 324,-84 324,-78 330,-72 336,-72 336,-72 528,-72 528,-72 534,-72 540,-78 540,-84 540,-84 540,-96 540,-96 540,-102 534,-108 528,-108"/>
|
||
<text text-anchor="middle" x="432" y="-86.3" font-family="Menlo" font-size="14.00">WFCollection</text>
|
||
</a>
|
||
</g>
|
||
</g>
|
||
<!-- Decodable -->
|
||
<g id="node2" class="node unknown">
|
||
<title>Decodable</title>
|
||
<path fill="none" stroke="black" d="M528,-36C528,-36 336,-36 336,-36 330,-36 324,-30 324,-24 324,-24 324,-12 324,-12 324,-6 330,0 336,0 336,0 528,0 528,0 534,0 540,-6 540,-12 540,-12 540,-24 540,-24 540,-30 534,-36 528,-36"/>
|
||
<text text-anchor="middle" x="432" y="-14.3" font-family="Menlo" font-size="14.00">Decodable</text>
|
||
</g>
|
||
<!-- WFCollection->Decodable -->
|
||
<g id="edge1" class="edge conformsTo">
|
||
<title>WFCollection->Decodable</title>
|
||
<path fill="none" stroke="black" d="M432,-71.7C432,-63.98 432,-54.71 432,-46.11"/>
|
||
<polygon fill="black" stroke="black" points="435.5,-46.1 432,-36.1 428.5,-46.1 435.5,-46.1"/>
|
||
</g>
|
||
</g>
|
||
</svg>
|
||
|
||
|
||
<figcaption hidden>Inheritance graph for WFCollection.</figcaption>
|
||
</figure>
|
||
<h3>Conforms To</h3>
|
||
<dl>
|
||
<dt class="unknown"><code>Decodable</code></dt>
|
||
</dl>
|
||
</section>
|
||
<section id="initializers">
|
||
<h2>Initializers</h2>
|
||
|
||
<div role="article" class="initializer" id="wfcollection.init(title:alias:)">
|
||
<h3>
|
||
<code>init(title:alias:)</code>
|
||
</h3>
|
||
<div class="declaration">
|
||
<pre class="highlight"><code><span class="keyword">public</span> <span class="keyword">init</span>(<span class="variable">title</span>: <span class="type">String</span>, <span class="variable">alias</span>: <span class="type">String</span>?) </code></pre>
|
||
</div>
|
||
<div class="summary" role="doc-abstract">
|
||
<p>Creates a basic <code>WFCollection</code> object.</p>
|
||
|
||
</div>
|
||
<div class="discussion">
|
||
<p>This initializer creates a bare-minimum <code>WFCollection</code> object for sending to the server; use the decoder-based
|
||
initializer to populate its other properties from the server response.</p>
|
||
|
||
<p>If no <code>alias</code> parameter is provided, one will be generated by the server.</p>
|
||
|
||
</div>
|
||
<h4>Parameters</h4>
|
||
|
||
<table class="parameters">
|
||
<thead hidden>
|
||
<tr>
|
||
<th>Name</th>
|
||
<th>Type</th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<th>title</th>
|
||
<td><code class="type">String</code></td>
|
||
<td><p>The title to give the Collection.</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th>alias</th>
|
||
<td><code class="type">String?</code></td>
|
||
<td><p>The alias for the Collection.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div role="article" class="initializer" id="wfcollection.init(from:)">
|
||
<h3>
|
||
<code>init(from:)</code>
|
||
</h3>
|
||
<div class="declaration">
|
||
<pre class="highlight"><code><span class="keyword">public</span> <span class="keyword">init</span>(<span class="variable">from</span> <span class="variable">decoder</span>: <span class="type">Decoder</span>) <span class="keyword">throws</span> </code></pre>
|
||
</div>
|
||
<div class="summary" role="doc-abstract">
|
||
<p>Creates a <code>WFCollection</code> object from the server response.</p>
|
||
|
||
</div>
|
||
<div class="discussion">
|
||
<p>Primarily used by the <code>WFClient</code> to create a <code>WFCollection</code> object from the JSON returned by the server.</p>
|
||
|
||
</div>
|
||
<h4>Parameters</h4>
|
||
|
||
<table class="parameters">
|
||
<thead hidden>
|
||
<tr>
|
||
<th>Name</th>
|
||
<th>Type</th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<th>decoder</th>
|
||
<td><code class="type">Decoder</code></td>
|
||
<td><p>The decoder to use for translating the server response to a Swift object.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<h4>Throws</h4>
|
||
<p>Error thrown by the <code>try</code> attempt when decoding any given property.</p>
|
||
|
||
</div>
|
||
</section>
|
||
<section id="properties">
|
||
<h2>Properties</h2>
|
||
|
||
<div role="article" class="variable" id="wfcollection.alias">
|
||
<h3>
|
||
<code>alias</code>
|
||
</h3>
|
||
<div class="declaration">
|
||
<pre class="highlight"><code><span class="keyword">public</span> <span class="keyword">var</span> <span class="variable">alias</span>: <span class="type">String</span>?</code></pre>
|
||
</div>
|
||
</div>
|
||
<div role="article" class="variable" id="wfcollection.title">
|
||
<h3>
|
||
<code>title</code>
|
||
</h3>
|
||
<div class="declaration">
|
||
<pre class="highlight"><code><span class="keyword">public</span> <span class="keyword">var</span> <span class="variable">title</span>: <span class="type">String</span></code></pre>
|
||
</div>
|
||
</div>
|
||
<div role="article" class="variable" id="wfcollection.description">
|
||
<h3>
|
||
<code>description</code>
|
||
</h3>
|
||
<div class="declaration">
|
||
<pre class="highlight"><code><span class="keyword">public</span> <span class="keyword">var</span> <span class="variable">description</span>: <span class="type">String</span>?</code></pre>
|
||
</div>
|
||
</div>
|
||
<div role="article" class="variable" id="wfcollection.stylesheet">
|
||
<h3>
|
||
<code>styleSheet</code>
|
||
</h3>
|
||
<div class="declaration">
|
||
<pre class="highlight"><code><span class="keyword">public</span> <span class="keyword">var</span> <span class="variable">styleSheet</span>: <span class="type">String</span>?</code></pre>
|
||
</div>
|
||
</div>
|
||
<div role="article" class="variable" id="wfcollection.ispublic">
|
||
<h3>
|
||
<code>isPublic</code>
|
||
</h3>
|
||
<div class="declaration">
|
||
<pre class="highlight"><code><span class="keyword">public</span> <span class="keyword">var</span> <span class="variable">isPublic</span>: <span class="type">Bool</span>?</code></pre>
|
||
</div>
|
||
</div>
|
||
<div role="article" class="variable" id="wfcollection.views">
|
||
<h3>
|
||
<code>views</code>
|
||
</h3>
|
||
<div class="declaration">
|
||
<pre class="highlight"><code><span class="keyword">public</span> <span class="keyword">var</span> <span class="variable">views</span>: <span class="type">Int</span>?</code></pre>
|
||
</div>
|
||
</div>
|
||
<div role="article" class="variable" id="wfcollection.email">
|
||
<h3>
|
||
<code>email</code>
|
||
</h3>
|
||
<div class="declaration">
|
||
<pre class="highlight"><code><span class="keyword">public</span> <span class="keyword">var</span> <span class="variable">email</span>: <span class="type">String</span>?</code></pre>
|
||
</div>
|
||
</div>
|
||
<div role="article" class="variable" id="wfcollection.url">
|
||
<h3>
|
||
<code>url</code>
|
||
</h3>
|
||
<div class="declaration">
|
||
<pre class="highlight"><code><span class="keyword">public</span> <span class="keyword">var</span> <span class="variable">url</span>: <span class="type">String</span>?</code></pre>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
|
||
|
||
</article>
|
||
</main>
|
||
|
||
<footer>
|
||
<p>
|
||
Generated on <time datetime="2021-05-27T16:04:29-0400">May 27, 2021</time> using <a href="https://github.com/SwiftDocOrg/swift-doc">swift-doc</a> <span class="version">1.0.0-beta.6</span>.
|
||
</p>
|
||
</footer>
|
||
</body>
|
||
</html>
|