Skip to content

Commit

Permalink
Update docs and files to distribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis committed May 14, 2014
1 parent 56d4cac commit e73f1a3
Show file tree
Hide file tree
Showing 20 changed files with 172 additions and 106 deletions.
140 changes: 91 additions & 49 deletions familysearch-javascript-sdk.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions familysearch-javascript-sdk.min.js

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions js/docs-setup.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion partials/api/discussions.functions.deleteDiscussion.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ <h1><code ng:non-bindable="">deleteDiscussion</code>
<p><a href="http://jsfiddle.net/DallanQ/LTm24/">editable example</a></p>
</div></div>
<h2 id="usage">Usage</h2>
<div class="usage"><pre class="prettyprint linenums">deleteDiscussion(did[, opts]);</pre>
<div class="usage"><pre class="prettyprint linenums">deleteDiscussion(did[, changeMessage][, opts]);</pre>
<h4 id="usage_parameters">Parameters</h4><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>did</td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="discussions-functions-page discussions-functions-deletediscussion-page"><p>id or full URL of the discussion</p>
</div></td></tr><tr><td>changeMessage <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="discussions-functions-page discussions-functions-deletediscussion-page"><p>change message (currently ignored)</p>
</div></td></tr><tr><td>opts <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="discussions-functions-page discussions-functions-deletediscussion-page"><p>options to pass to the http function specified during init</p>
</div></td></tr></tbody></table><h4 id="usage_returns">Returns</h4><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="discussions-functions-page discussions-functions-deletediscussion-page"><p>promise for the discussion id/URL</p>
</div></td></tr></table></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ <h1><code ng:non-bindable="">deleteDiscussionComment</code>
<p><a href="http://jsfiddle.net/DallanQ/D2r7h/">editable example</a></p>
</div></div>
<h2 id="usage">Usage</h2>
<div class="usage"><pre class="prettyprint linenums">deleteDiscussionComment(did[, cmid][, opts]);</pre>
<div class="usage"><pre class="prettyprint linenums">deleteDiscussionComment(did[, cmid][, changeMessage][, opts]);</pre>
<h4 id="usage_parameters">Parameters</h4><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>did</td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="discussions-functions-page discussions-functions-deletediscussioncomment-page"><p>discussion id or full URL of the comment</p>
</div></td></tr><tr><td>cmid <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="discussions-functions-page discussions-functions-deletediscussioncomment-page"><p>id of the comment (must be set if did is a comment id and not the full URL)</p>
</div></td></tr><tr><td>changeMessage <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="discussions-functions-page discussions-functions-deletediscussioncomment-page"><p>change message (currently ignored)</p>
</div></td></tr><tr><td>opts <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="discussions-functions-page discussions-functions-deletediscussioncomment-page"><p>options to pass to the http function specified during init</p>
</div></td></tr></tbody></table><h4 id="usage_returns">Returns</h4><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="discussions-functions-page discussions-functions-deletediscussioncomment-page"><p>promise for the did</p>
</div></td></tr></table></div>
Expand Down
3 changes: 2 additions & 1 deletion partials/api/discussions.functions.deleteMemoryComment.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ <h1><code ng:non-bindable="">deleteMemoryComment</code>
<p><a href="http://jsfiddle.net/DallanQ/5bbuQ/">editable example</a></p>
</div></div>
<h2 id="usage">Usage</h2>
<div class="usage"><pre class="prettyprint linenums">deleteMemoryComment(mid[, cmid][, opts]);</pre>
<div class="usage"><pre class="prettyprint linenums">deleteMemoryComment(mid[, cmid][, changeMessage][, opts]);</pre>
<h4 id="usage_parameters">Parameters</h4><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>mid</td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="discussions-functions-page discussions-functions-deletememorycomment-page"><p>memory id or full URL of the comment</p>
</div></td></tr><tr><td>cmid <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="discussions-functions-page discussions-functions-deletememorycomment-page"><p>id of the comment (must be set if mid is a memory id and not the full URL)</p>
</div></td></tr><tr><td>changeMessage <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="discussions-functions-page discussions-functions-deletememorycomment-page"><p>change message (currently ignored)</p>
</div></td></tr><tr><td>opts <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="discussions-functions-page discussions-functions-deletememorycomment-page"><p>options to pass to the http function specified during init</p>
</div></td></tr></tbody></table><h4 id="usage_returns">Returns</h4><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="discussions-functions-page discussions-functions-deletememorycomment-page"><p>promise for the mid</p>
</div></td></tr></table></div>
Expand Down
10 changes: 6 additions & 4 deletions partials/api/discussions.types.constructor.Comment.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ <h2 id="usage">Usage</h2>
<h4 id="usage_parameters">Parameters</h4><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>data <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="discussions-types-page discussions-types-constructor-comment-page"><p>an object with optional attributes {text, $discussionId, $memoryId}</p>
</div></td></tr></tbody></table></div>
<div class="member method"><h2 id="methods">Methods</h2>
<ul class="methods"><li><h3 id="methods_$delete">$delete(opts)</h3>
<ul class="methods"><li><h3 id="methods_$delete">$delete(changeMessage, opts)</h3>
<div class="$delete"><div class="discussions-types-page discussions-types-constructor-comment-delete-page"><p>delete this comment - see <a href="#/api/discussions.functions:deleteDiscussionComment">deleteDiscussionComment</a>
or <a href="#/api/memories.functions:deleteMemoryComment">deleteMemoryComment</a></p>
</div><h5 id="methods_$delete_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>opts <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="discussions-types-page discussions-types-constructor-comment-delete-page"><p>options to pass to the http function specified during init</p>
</div><h5 id="methods_$delete_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>changeMessage <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="discussions-types-page discussions-types-constructor-comment-delete-page"><p>change message (currently ignored)</p>
</div></td></tr><tr><td>opts <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="discussions-types-page discussions-types-constructor-comment-delete-page"><p>options to pass to the http function specified during init</p>
</div></td></tr></tbody></table><h5 id="methods_$delete_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="discussions-types-page discussions-types-constructor-comment-delete-page"><p>promise for the comment url</p>
</div></td></tr></table></div>
</li>
Expand All @@ -35,13 +36,14 @@ <h4 id="usage_parameters">Parameters</h4><table class="variables-matrix table ta
<div class="$getcommenturl"><h5 id="methods_$getcommenturl_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-string">String</a></td><td><div class="discussions-types-page discussions-types-constructor-comment-getcommenturl-page"><p>URL of this comment; <em>NOTE</em> however, that individual comments cannot be read</p>
</div></td></tr></table></div>
</li>
<li><h3 id="methods_$save">$save(opts)</h3>
<li><h3 id="methods_$save">$save(changeMessage, opts)</h3>
<div class="$save"><div class="discussions-types-page discussions-types-constructor-comment-save-page"><p>Create a new comment or update an existing comment</p>
<p><em>NOTE</em>: there&#39;s no <em>refresh</em> parameter because it&#39;s not possible to read individual comments;
however, the comment&#39;s id and URL is set when creating a new comment</p>
<p><strong>NOTE</strong>: it is not currently possible to update memory comments.</p>
<p><a href="http://jsfiddle.net/DallanQ/9YHfX/">editable example</a></p>
</div><h5 id="methods_$save_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>opts <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="discussions-types-page discussions-types-constructor-comment-save-page"><p>options to pass to the http function specified during init</p>
</div><h5 id="methods_$save_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>changeMessage <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="discussions-types-page discussions-types-constructor-comment-save-page"><p>change message (currently ignored)</p>
</div></td></tr><tr><td>opts <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="discussions-types-page discussions-types-constructor-comment-save-page"><p>options to pass to the http function specified during init</p>
</div></td></tr></tbody></table><h5 id="methods_$save_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="discussions-types-page discussions-types-constructor-comment-save-page"><p>promise of the comment id</p>
</div></td></tr></table></div>
</li>
Expand Down
10 changes: 6 additions & 4 deletions partials/api/discussions.types.constructor.Discussion.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ <h2 id="usage">Usage</h2>
<h4 id="usage_parameters">Parameters</h4><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>data <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="discussions-types-page discussions-types-constructor-discussion-page"><p>an object with optional attributes {title, details}</p>
</div></td></tr></tbody></table></div>
<div class="member method"><h2 id="methods">Methods</h2>
<ul class="methods"><li><h3 id="methods_$delete">$delete(opts)</h3>
<ul class="methods"><li><h3 id="methods_$delete">$delete(changeMessage, opts)</h3>
<div class="$delete"><div class="discussions-types-page discussions-types-constructor-discussion-delete-page"><p>delete this discussion - see <a href="#/api/discussions.functions:deleteDiscussion">deleteDiscussion</a></p>
<p><strong>NOTE</strong> if you delete a discussion, it&#39;s up to you to delete the corresponding Discussion Refs
Since there is no way to tell which people a discussion has been linked to, your best best is to
attach a discussion to a single person and to delete the discussion when you delete the discussion-reference
FamilySearch is aware of this issue but hasn&#39;t committed to a fix.</p>
</div><h5 id="methods_$delete_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>opts <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="discussions-types-page discussions-types-constructor-discussion-delete-page"><p>options to pass to the http function specified during init</p>
</div><h5 id="methods_$delete_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>changeMessage <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="discussions-types-page discussions-types-constructor-discussion-delete-page"><p>change message (currently ignored)</p>
</div></td></tr><tr><td>opts <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="discussions-types-page discussions-types-constructor-discussion-delete-page"><p>options to pass to the http function specified during init</p>
</div></td></tr></tbody></table><h5 id="methods_$delete_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="discussions-types-page discussions-types-constructor-discussion-delete-page"><p>promise for the discussion id</p>
</div></td></tr></table></div>
</li>
Expand All @@ -41,10 +42,11 @@ <h4 id="usage_parameters">Parameters</h4><table class="variables-matrix table ta
<div class="$getcommentsurl"><h5 id="methods_$getcommentsurl_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-string">String</a></td><td><div class="discussions-types-page discussions-types-constructor-discussion-getcommentsurl-page"><p>URL of the comments endpoint - pass into <a href="#/api/discussions.functions:getDiscussionComments">getDiscussionComments</a> for details</p>
</div></td></tr></table></div>
</li>
<li><h3 id="methods_$save">$save(refresh, opts)</h3>
<li><h3 id="methods_$save">$save(changeMessage, refresh, opts)</h3>
<div class="$save"><div class="discussions-types-page discussions-types-constructor-discussion-save-page"><p>Create a new discussion (if this discussion does not have an id) or update the existing discussion</p>
<p><a href="http://jsfiddle.net/DallanQ/t6Yh2/">editable example</a></p>
</div><h5 id="methods_$save_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>refresh <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-boolean">boolean</a></td><td><div class="discussions-types-page discussions-types-constructor-discussion-save-page"><p>true to read the discussion after updating</p>
</div><h5 id="methods_$save_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>changeMessage <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="discussions-types-page discussions-types-constructor-discussion-save-page"><p>change message (currently ignored)</p>
</div></td></tr><tr><td>refresh <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-boolean">boolean</a></td><td><div class="discussions-types-page discussions-types-constructor-discussion-save-page"><p>true to read the discussion after updating</p>
</div></td></tr><tr><td>opts <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="discussions-types-page discussions-types-constructor-discussion-save-page"><p>options to pass to the http function specified during init</p>
</div></td></tr></tbody></table><h5 id="methods_$save_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="discussions-types-page discussions-types-constructor-discussion-save-page"><p>promise of the discussion id, which is fulfilled after the discussion has been updated,
and if refresh is true, after the discussion has been read.</p>
Expand Down
6 changes: 4 additions & 2 deletions partials/api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,10 @@ <h3 id="handling-responses">Handling responses</h3>
});
</pre>
<p>To avoid name conflicts with FamilySearch property names and SDK convenience functions, we recommend that you begin
your convenience functions with a <code>_</code>, though you are free to begin your convenience functions however you want.</p>
<p>Also, object properties beginning with <code>$</code> or <code>_</code> are removed before posting data to FamilySearch.</p>
your prototype functions and any properties you add to objects with a <code>_</code>.</p>
<p>You are free to begin your prototype functions and object properties however you want; however, properties
beginning with a <code>_</code> are retained when an object is updated and the refresh parameter is set to true.
Also, object properties beginning with <code>$</code> or <code>_</code> are removed before posting data to FamilySearch.</p>
<h3 id="updates">Updates</h3>
<p>All updateable objects have a constructor that takes a parameters object for initialization,
one or more <em>$set...()</em> functions, <em>$save()</em>, and <em>$delete()</em> functions.
Expand Down
3 changes: 2 additions & 1 deletion partials/api/memories.functions.deleteMemory.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ <h1><code ng:non-bindable="">deleteMemory</code>
<p><a href="http://jsfiddle.net/DallanQ/Tm6X2/">editable example</a></p>
</div></div>
<h2 id="usage">Usage</h2>
<div class="usage"><pre class="prettyprint linenums">deleteMemory(mid[, opts]);</pre>
<div class="usage"><pre class="prettyprint linenums">deleteMemory(mid[, changeMessage][, opts]);</pre>
<h4 id="usage_parameters">Parameters</h4><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>mid</td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="memories-functions-page memories-functions-deletememory-page"><p>id or full URL of the memory</p>
</div></td></tr><tr><td>changeMessage <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="memories-functions-page memories-functions-deletememory-page"><p>change message (currently ignored)</p>
</div></td></tr><tr><td>opts <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="memories-functions-page memories-functions-deletememory-page"><p>options to pass to the http function specified during init</p>
</div></td></tr></tbody></table><h4 id="usage_returns">Returns</h4><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="memories-functions-page memories-functions-deletememory-page"><p>promise for the memory id/URL</p>
</div></td></tr></table></div>
Expand Down
Loading

0 comments on commit e73f1a3

Please sign in to comment.