ReCaptcha/Classes/ReCaptcha.html

228 lines
10 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<title>ReCaptcha Class Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Class/ReCaptcha" class="dashAnchor"></a>
<a title="ReCaptcha Class Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">ReCaptcha Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">ReCaptcha Reference</a>
<img id="carat" src="../img/carat.png" />
ReCaptcha Class Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/ReCaptcha.html">ReCaptcha</a>
</li>
<li class="nav-group-task">
<a href="../Classes/ReCaptcha/Endpoint.html"> Endpoint</a>
</li>
<li class="nav-group-task">
<a href="../Classes/ReCaptchaWebViewManager.html">ReCaptchaWebViewManager</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/ReCaptchaError.html">ReCaptchaError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Extensions/Reactive.html">Reactive</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>ReCaptcha</h1>
<div class="declaration">
<div class="language">
<pre class="highlight"><code><span class="n">open</span> <span class="kd">class</span> <span class="kt">ReCaptcha</span><span class="p">:</span> <span class="kt"><a href="../Classes/ReCaptchaWebViewManager.html">ReCaptchaWebViewManager</a></span></code></pre>
</div>
</div>
<p>The public facade of ReCaptcha</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:9ReCaptchaAAC8EndpointO"></a>
<a name="//apple_ref/swift/Enum/Endpoint" class="dashAnchor"></a>
<a class="token" href="#/s:9ReCaptchaAAC8EndpointO">Endpoint</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The JS API endpoint to be loaded onto the HTML file.</p>
<a href="../Classes/ReCaptcha/Endpoint.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Endpoint</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9ReCaptchaAACABSSSg6apiKey_10Foundation3URLVSg04baseF0AB8EndpointO8endpointtKcfc"></a>
<a name="//apple_ref/swift/Method/init(apiKey:baseURL:endpoint:)" class="dashAnchor"></a>
<a class="token" href="#/s:9ReCaptchaAACABSSSg6apiKey_10Foundation3URLVSg04baseF0AB8EndpointO8endpointtKcfc">init(apiKey:baseURL:endpoint:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Initializes a ReCaptcha object</p>
<p>Both <code>apiKey</code> and <code>baseURL</code> may be nil, in which case the lib will look for entries of <code>ReCaptchaKey</code> and
<code>ReCaptchaDomain</code>, respectively, in the project&rsquo;s Info.plist</p>
<p>A key may be aquired here: <a href="https://www.google.com/recaptcha/admin#list">https://www.google.com/recaptcha/admin#list</a></p>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
<code><a href="../Enums/ReCaptchaError.html#/s:9ReCaptcha0aB5ErrorO08htmlLoadC0A2CmF">ReCaptchaError.htmlLoadError</a></code>: if is unable to load the HTML embedded in the bundle.
</div>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
<code><a href="../Enums/ReCaptchaError.html#/s:9ReCaptcha0aB5ErrorO14apiKeyNotFoundA2CmF">ReCaptchaError.apiKeyNotFound</a></code>: if an <code>apiKey</code> is not provided and can&rsquo;t find one in the project&rsquo;s
Info.plist.
</div>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
<code><a href="../Enums/ReCaptchaError.html#/s:9ReCaptcha0aB5ErrorO15baseURLNotFoundA2CmF">ReCaptchaError.baseURLNotFound</a></code>: if a <code>baseURL</code> is not provided and can&rsquo;t find one in the project&rsquo;s
Info.plist.
</div>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
Rethrows any exceptions thrown by <code>String(contentsOfFile:)</code>
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">apiKey</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span> <span class="nv">baseURL</span><span class="p">:</span> <span class="kt">URL</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span> <span class="nv">endpoint</span><span class="p">:</span> <span class="kt"><a href="../Classes/ReCaptcha/Endpoint.html">Endpoint</a></span> <span class="o">=</span> <span class="o">.</span><span class="k">default</span><span class="p">)</span> <span class="k">throws</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>apiKey</em>
</code>
</td>
<td>
<div>
<p>The API key sent to the ReCaptcha init</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>infoPlistKey</em>
</code>
</td>
<td>
<div>
<p>The API key retrived from the application&rsquo;s Info.plist</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>baseURL</em>
</code>
</td>
<td>
<div>
<p>The base URL sent to the ReCaptcha init</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>infoPlistURL</em>
</code>
</td>
<td>
<div>
<p>The base URL retrieved from the application&rsquo;s Info.plist</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://github.com/fjcaetano/ReCaptcha" target="_blank" rel="external">Flávio Caetano</a>. All rights reserved. (Last updated: 2018-01-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>