Skip to content

Commit 2256bbc

Browse files
committed
Site updated: 2020-03-22 20:57:02
1 parent 6d55879 commit 2256bbc

File tree

3 files changed

+58
-19
lines changed

3 files changed

+58
-19
lines changed

javascript/reference/index.html

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,39 @@ <h1 id="Examples">Examples</h1>
108108
</div>
109109
<div class="book-content">
110110
<div class="book-post">
111-
<p>Coming Soon.</p>
111+
<h1 id="JavaScript-Library-Reference">JavaScript Library Reference</h1>
112+
<p>The methods available in the library currently are as follows:</p>
113+
<table>
114+
<thead>
115+
<tr>
116+
<th>Method</th>
117+
<th>Return</th>
118+
<th>Definition</th>
119+
</tr>
120+
</thead>
121+
<tbody>
122+
<tr>
123+
<td><code>check()</code></td>
124+
<td>JSON</td>
125+
<td>Sends a ping to the network and determines the authenticity of request and if the server is responding</td>
126+
</tr>
127+
<tr>
128+
<td><code>labels(pageBody: HTML Document)</code></td>
129+
<td>JSON</td>
130+
<td>Generates labels for all elements on the page and updates their alternative text.</td>
131+
</tr>
132+
<tr>
133+
<td><code>captions(pageBody: HTML Document, pageURL: URL of current page)</code></td>
134+
<td>JSON</td>
135+
<td>Generates captions for all images on the page and updates their alternative text.</td>
136+
</tr>
137+
<tr>
138+
<td><code>recommendations()</code></td>
139+
<td>JSON</td>
140+
<td>Returns the pages recommended for this page.</td>
141+
</tr>
142+
</tbody>
143+
</table>
112144

113145
</div>
114146

javascript/usage/index.html

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,26 +108,33 @@ <h1 id="Examples">Examples</h1>
108108
</div>
109109
<div class="book-content">
110110
<div class="book-post">
111-
<ol start="6">
111+
<h1 id="Usage-JavaScript-Library">Usage - JavaScript Library</h1>
112+
<ol>
112113
<li>On your web page, include the following line to import the AifyJS package into your application -</li>
113114
</ol>
114115
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">&lt;script src&#x3D;&quot;https:&#x2F;&#x2F;thecodefoundation.dev&#x2F;aify.js&quot;&gt;&lt;&#x2F;script&gt;</span><br></pre></td></tr></table></figure>
115-
<ol start="7">
116+
<ol start="2">
116117
<li>In your web page, use the following line to instantiate a connection to the Aify API -</li>
117118
</ol>
118-
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">var ai &#x3D; new aifyjs();</span><br></pre></td></tr></table></figure>
119-
<ol start="8">
119+
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">var ai &#x3D; new aifyjs(&quot;YOUR-API-KEY&quot;);</span><br></pre></td></tr></table></figure>
120+
<p>If you have not yet generated the API Key, read <a href="http://localhost:4000/getting-started/#Step-3-Get-your-API-Keys" target="_blank" rel="noopener">How to get your API Keys</a>.</p>
121+
<ol start="3">
120122
<li>To generate element labels on the web page, use the following line -</li>
121123
</ol>
122124
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ai.labels();</span><br></pre></td></tr></table></figure>
123-
<ol start="9">
125+
<ol start="4">
124126
<li>To fetch captions for the images on the page, use the following line -</li>
125127
</ol>
126128
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ai.captions();</span><br></pre></td></tr></table></figure>
127-
<ol start="10">
128-
<li>When your page loads, it will silently cause an update of the page source to reflect the labels and captions fetched from the Aify API.</li>
129-
<li>Voila! Your website is more accessible to people with visual challenges now!</li>
129+
<ol start="5">
130+
<li>
131+
<p>When your page loads, it will silently cause an update of the page source to reflect the labels and captions fetched from the Aify API.</p>
132+
</li>
133+
<li>
134+
<p>Voila! Your website is more accessible to people with visual challenges now!</p>
135+
</li>
130136
</ol>
137+
<p>You can read about all available library methods in the <a href="/javascript/reference">JavaScript Library Reference</a>.</p>
131138

132139
</div>
133140

sitemap.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,23 @@
66
</url>
77

88
<url>
9-
<loc>https://docs.thecodefoundation.dev/getting-started/</loc>
9+
<loc>https://docs.thecodefoundation.dev/javascript/reference/</loc>
1010

11-
<lastmod>2020-03-12T21:33:09.327Z</lastmod>
11+
<lastmod>2020-03-22T15:26:41.414Z</lastmod>
1212

1313
</url>
1414

1515
<url>
1616
<loc>https://docs.thecodefoundation.dev/javascript/usage/</loc>
1717

18-
<lastmod>2020-03-12T21:11:14.757Z</lastmod>
18+
<lastmod>2020-03-22T15:17:35.624Z</lastmod>
19+
20+
</url>
21+
22+
<url>
23+
<loc>https://docs.thecodefoundation.dev/getting-started/</loc>
24+
25+
<lastmod>2020-03-12T21:33:09.327Z</lastmod>
1926

2027
</url>
2128

@@ -40,13 +47,6 @@
4047

4148
</url>
4249

43-
<url>
44-
<loc>https://docs.thecodefoundation.dev/javascript/reference/</loc>
45-
46-
<lastmod>2020-03-12T14:12:42.012Z</lastmod>
47-
48-
</url>
49-
5050
<url>
5151
<loc>https://docs.thecodefoundation.dev/examples/showcase/</loc>
5252

0 commit comments

Comments
 (0)