Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.

Commit c4264fe

Browse files
authored
Merge pull request #108 from michizhou/patch-2
Fix: update Client instantiations and resolve typos
2 parents 850ebbf + bc96855 commit c4264fe

File tree

5 files changed

+42
-36
lines changed

5 files changed

+42
-36
lines changed

app/views/docs/getting-started-for-android.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ $androidVersion = (isset($versions['android'])) ? $versions['android'] : '';
4444

4545
<h3><a href="/docs/getting-started-for-android#OAuthCallback" id="OAuthCallback">OAuth Callback</a></h3>
4646

47-
<p>In order to capture the Appwrite OAuth callback url, the following activity needs to be added inside the `&lt;application&gt;` tag, along side the existing `&lt;activity&gt;` tags in your <a href="https://github.com/appwrite/playground-for-android/blob/master/app/src/main/AndroidManifest.xml" target="_blank" rel="noopener">AndroidManifest.xml</a>. Be sure to relpace the <b>[PROJECT_ID]</b> string with your actual Appwrite project ID. You can find your Appwrite project ID in you project settings screen in your Appwrite console.</p>
47+
<p>In order to capture the Appwrite OAuth callback url, the following activity needs to be added inside the `&lt;application&gt;` tag, along side the existing `&lt;activity&gt;` tags in your <a href="https://github.com/appwrite/playground-for-android/blob/master/app/src/main/AndroidManifest.xml" target="_blank" rel="noopener">AndroidManifest.xml</a>. Be sure to replace the <b>[PROJECT_ID]</b> string with your actual Appwrite project ID. You can find your Appwrite project ID in you project settings screen in your Appwrite console.</p>
4848

4949
<div class="ide" data-lang="html" data-lang-label="XML">
5050
<pre class="line-numbers"><code class="prism language-xml" data-prism><?php echo $this->escape('<manifest ...>
@@ -76,7 +76,7 @@ import io.appwrite.services.Account
7676
val client = Client(context)
7777
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
7878
.setProject("5df5acd0d48c2") // Your project ID
79-
.setSelfSigned(true) // For self signed certificates, only use for development</code></pre>
79+
.setSelfSigned(status: true) // For self signed certificates, only use for development</code></pre>
8080
</div>
8181

8282
<p>Before starting to send any API calls to your new Appwrite instance, make sure your Android emulators has network access to the Appwrite server hostname or IP address.</p>
@@ -119,7 +119,7 @@ import io.appwrite.services.Account
119119
val client = Client(context)
120120
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
121121
.setProject("5df5acd0d48c2") // Your project ID
122-
.setSelfSigned(true) // For self signed certificates, only use for development
122+
.setSelfSigned(status: true) // For self signed certificates, only use for development
123123

124124
// Register User
125125
val account = Account(client)

app/views/docs/getting-started-for-flutter.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ $version = (isset($versions['flutter'])) ? $versions['flutter'] : '';
3333

3434
<p>For <b>Android</b> first add your app <u>name</u> and <u>package name</u>, Your package name is generally the <b>applicationId</b> in your app-level <a href="https://github.com/appwrite/playground-for-flutter/blob/0fdbdff98384fff940ed0b1e08cf14cfe3a2be3e/android/app/build.gradle#L41" target="_blank" rel="noopener">build.gradle</a> file. By registering your new app platform, you are allowing your app to communicate with the Appwrite API.</p>
3535

36-
<p>In order to capture the Appwrite OAuth callback url, the following activity needs to be added inside the `&lt;application&gt;` tag, along side the existing `&lt;activity&gt;` tags in your <a href="https://github.com/appwrite/playground-for-flutter/blob/master/android/app/src/main/AndroidManifest.xml" target="_blank" rel="noopener">AndroidManifest.xml</a>. Be sure to relpace the <b>[PROJECT_ID]</b> string with your actual Appwrite project ID. You can find your Appwrite project ID in you project settings screen in your Appwrite console.</p>
36+
<p>In order to capture the Appwrite OAuth callback url, the following activity needs to be added inside the `&lt;application&gt;` tag, along side the existing `&lt;activity&gt;` tags in your <a href="https://github.com/appwrite/playground-for-flutter/blob/master/android/app/src/main/AndroidManifest.xml" target="_blank" rel="noopener">AndroidManifest.xml</a>. Be sure to replace the <b>[PROJECT_ID]</b> string with your actual Appwrite project ID. You can find your Appwrite project ID in you project settings screen in your Appwrite console.</p>
3737

3838
<div class="ide" data-lang="html" data-lang-label="XML">
3939
<pre class="line-numbers"><code class="prism language-xml" data-prism><?php echo $this->escape('<manifest ...>
@@ -61,7 +61,7 @@ $version = (isset($versions['flutter'])) ? $versions['flutter'] : '';
6161
<p>The Appwrite SDK uses ASWebAuthenticationSession on iOS 12+ and SFAuthenticationSession on iOS 11 to allow OAuth authentication. You have to change your iOS Deployment Target in Xcode to be iOS >= 11 to be able to build your app on an emulator or a real device.</p>
6262

6363
<ol class="margin-top margin-bottom-large">
64-
<li class="margin-bottom-small">In Xcode, open Runner.xcworkspace in your app's ios folder.
64+
<li class="margin-bottom-small">In Xcode, open Runner.xcworkspace in your app's iOS folder.
6565
<li class="margin-bottom-small">To view your app's settings, select the Runner project in the Xcode project navigator. Then, in the main view sidebar, select the Runner target.</li>
6666
<li class="margin-bottom-small">Select the General tab.</li>
6767
<li class="margin-bottom-small">In Deployment Info, 'Target' select iOS 11.0</li>
@@ -171,7 +171,7 @@ Client client = Client();
171171
client
172172
.setEndpoint('https://localhost/v1') // Your Appwrite Endpoint
173173
.setProject('5e8cf4f46b5e8') // Your project ID
174-
.setSelfSigned(true) // For self signed certificates, only use for development
174+
.setSelfSigned(status: true) // For self signed certificates, only use for development
175175
;
176176

177177
// Register User

app/views/docs/getting-started-for-server.phtml

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,14 @@ client
186186
<div class="ide margin-top-small" data-lang="dart" data-lang-label="Dart SDK">
187187
<pre class="line-numbers"><code class="prism language-dart" data-prism>import 'package:dart_appwrite/dart_appwrite.dart';
188188

189-
Client client = Client();
190-
client
191-
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
192-
.setProject('5df5acd0d48c2') // Your project ID
193-
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
194-
;</code></pre>
189+
void main() {
190+
Client client = Client();
191+
client
192+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
193+
.setProject('5df5acd0d48c2') // Your project ID
194+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
195+
;
196+
}</code></pre>
195197
</div>
196198
</li>
197199
<li>
@@ -358,12 +360,14 @@ client
358360
<div class="ide margin-top-small" data-lang="dart" data-lang-label="Dart SDK">
359361
<pre class="line-numbers"><code class="prism language-dart" data-prism>import 'package:dart_appwrite/dart_appwrite.dart';
360362

361-
Client client = Client();
362-
client
363-
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
364-
.setProject('5df5acd0d48c2') // Your project ID
365-
.setJWT('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
366-
;</code></pre>
363+
void main() {
364+
Client client = Client();
365+
client
366+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
367+
.setProject('5df5acd0d48c2') // Your project ID
368+
.setJWT('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
369+
;
370+
}</code></pre>
367371
</div>
368372
</li>
369373
<li>
@@ -608,22 +612,24 @@ promise.then(function (response) {
608612
<div class="ide margin-top-small" data-lang="dart" data-lang-label="Dart SDK">
609613
<pre class="line-numbers"><code class="prism language-dart" data-prism>import 'package:dart_appwrite/dart_appwrite.dart';
610614

611-
final client = Client();
612-
final users = Users(client);
615+
void main() {
616+
final client = Client();
617+
final users = Users(client);
613618

614-
client
615-
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
616-
.setProject('5df5acd0d48c2') // Your project ID
617-
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
618-
;
619+
client
620+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
621+
.setProject('5df5acd0d48c2') // Your project ID
622+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
623+
;
619624

620-
final res = users.create('[email protected]', 'password');
625+
final res = users.create('[email protected]', 'password');
621626

622-
res.then((response) {
623-
print(response);
624-
}).catchError((error) {
625-
print(error);
626-
});</code></pre>
627+
res.then((response) {
628+
print(response);
629+
}).catchError((error) {
630+
print(error);
631+
});
632+
}</code></pre>
627633
</div>
628634
</li>
629635
<li>

app/views/docs/realtime.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ sdk.subscribe(channel, callback);</code></pre>
4747
client
4848
.setEndpoint('https://localhost/v1') // Your Appwrite Endpoint
4949
.setProject('5e8cf4f46b5e8') // Your project ID
50-
.setSelfSigned(true) // For self signed certificates, only use for development
50+
.setSelfSigned(status: true) // For self signed certificates, only use for development
5151
;
5252

5353
final realtime = Realtime(client);
@@ -65,7 +65,7 @@ subscription.stream.listen(callback);
6565
client
6666
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
6767
.setProject("5df5acd0d48c2") // Your project ID
68-
.setSelfSigned(true) // For self signed certificates, only use for development
68+
.setSelfSigned(status: true) // For self signed certificates, only use for development
6969

7070
val realtime = Realtime(client)
7171

@@ -291,7 +291,7 @@ subscription.close()</code></pre>
291291
</tbody>
292292
</table>
293293

294-
<p>If you subscribe to the <span class="tag">documents</span> channel and a document the user is allowed to read is updated, you will receive an object containing informations about the event and the updated document.</p>
294+
<p>If you subscribe to the <span class="tag">documents</span> channel and a document the user is allowed to read is updated, you will receive an object containing information about the event and the updated document.</p>
295295

296296
<p>The response will look like this:</p>
297297

app/views/docs/security.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<h2>SSL Certificates</h2>
66

7-
<p>Appwrite uses <a href="https://github.com/traefik/traefik" target="_blank" rel="noopener">Traefik</a> and <a href="https://letsencrypt.org/" target="_blank" rel="noopener">Let'sencrypt</a> to serve, create, and renew SSL certificates for your Appwrite server and any custom domains set for your projects.</p>
7+
<p>Appwrite uses <a href="https://github.com/traefik/traefik" target="_blank" rel="noopener">Traefik</a> and <a href="https://letsencrypt.org/" target="_blank" rel="noopener">Let's Encrypt</a> to serve, create, and renew SSL certificates for your Appwrite server and any custom domains set for your projects.</p>
88

99
<p>Once a new SSL certificate has been created, Appwrite will renew it 60 days before its 90 days of default expiration. Auto-generation of SSL certificates is only possible for public-facing domains. When used with localhost, Appwrite will generate a <a href="https://en.wikipedia.org/wiki/Self-signed_certificate" target="_blank" rel="noopener">self-signed SSL certificate</a>.</p>
1010

@@ -16,7 +16,7 @@
1616

1717
<h2>Password Hashing</h2>
1818

19-
<h2>Resource-level Secuirty</h2>
19+
<h2>Resource-level Security</h2>
2020

2121
<h2>Abuse Protection & Rate-Limiting</h2>
2222

0 commit comments

Comments
 (0)