This repository has been archived by the owner on Sep 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #396 from appwrite/add-dotnet-examples
Add .NET SDK examples to guides
- Loading branch information
Showing
4 changed files
with
175 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,6 +99,12 @@ $swiftVersion = $versions['swift'] ?? ''; | |
]</code></pre> | ||
</div> | ||
</li> | ||
<li> | ||
<h3>.NET</h3> | ||
<div class="ide margin-top-small" data-lang="csharp" data-lang-label="C#"> | ||
<pre class="line-numbers"><code class="prism language-csharp" data-prism>dotnet add package Appwrite</code></pre> | ||
</div> | ||
</li> | ||
</ul> | ||
|
||
<h2><a href="/docs/getting-started-for-server#createProject" id="createProject">Create Your First Appwrite Project</a></h2> | ||
|
@@ -216,6 +222,17 @@ let client = Client() | |
</code></pre> | ||
</div> | ||
</li> | ||
<li> | ||
<h3>.NET</h3> | ||
<div class="ide margin-top-small" data-lang="csharp" data-lang-label=".NET SDK"> | ||
<pre class="line-numbers"><code class="prism language-csharp" data-prism>using Appwrite; | ||
|
||
var client = new Client() | ||
.SetEndpoint("http://cloud.appwrite.io/v1") // Your Appwrite Endpoint | ||
.SetProject("[PROJECT_ID]") // Your project ID | ||
.SetKey("919c2db5d4...a2a3346ad2"); // Your secret API Key</code></pre> | ||
</div> | ||
</li> | ||
</ul> | ||
|
||
<div class="notice"> | ||
|
@@ -373,6 +390,18 @@ let client = Client() | |
.setEndpoint("https://cloud.appwrite.io/v1") // Your Appwrite Endpoint | ||
.setProject("[PROJECT_ID]") // Your project ID | ||
.setJWT("919c2db5d4...a2a3346ad2") // Your secret JWT | ||
</code></pre> | ||
</div> | ||
</li> | ||
<li> | ||
<h3>.NET</h3> | ||
<div class="ide margin-top-small" data-lang="csharp" data-lang-label=".NET SDK"> | ||
<pre class="line-numbers"><code class="prism language-csharp" data-prism>using Appwrite; | ||
|
||
var client = new Client() | ||
.SetEndpoint("http://cloud.appwrite.io/v1") // Your Appwrite Endpoint | ||
.SetProject("[PROJECT_ID]") // Your project ID | ||
.SetJWT("919c2db5d4...a2a3346ad2"); // Your secret JWT | ||
</code></pre> | ||
</div> | ||
</li> | ||
|
@@ -521,6 +550,21 @@ let user = try await users.create( | |
)</code></pre> | ||
</div> | ||
</li> | ||
<li> | ||
<h3>.NET</h3> | ||
<div class="ide margin-top-small" data-lang="csharp" data-lang-label=".NET SDK"> | ||
<pre class="line-numbers"><code class="prism language-csharp" data-prism>using Appwrite.Services; | ||
using Appwrite.Models; | ||
|
||
var users = new Users(client); | ||
|
||
var user = await users.Create( | ||
userId: ID.Unique(), | ||
email: "[email protected]", | ||
phone: null, | ||
password: "password");</code></pre> | ||
</div> | ||
</li> | ||
</ul> | ||
|
||
<h2><a href="/docs/getting-started-for-server#fullExample" id="fullExample">Full Example</a></h2> | ||
|
@@ -711,6 +755,27 @@ let user = try await users.create( | |
)</code></pre> | ||
</div> | ||
</li> | ||
<li> | ||
<h3>.NET</h3> | ||
<div class="ide margin-top-small" data-lang="csharp" data-lang-label=".NET SDK"> | ||
<pre class="line-numbers"><code class="prism language-csharp" data-prism>using Appwrite; | ||
using Appwrite.Services; | ||
using Appwrite.Models; | ||
|
||
var client = new Client() | ||
.SetEndpoint("http://cloud.appwrite.io/v1") // Your Appwrite Endpoint | ||
.SetProject("[PROJECT_ID]") // Your project ID | ||
.SetKey("cd868db89"); // Your secret API key | ||
|
||
var users = new Users(client); | ||
|
||
var user = await users.Create( | ||
userId: ID.Unique(), | ||
email: "[email protected]", | ||
phone: null, | ||
password: "password");</code></pre> | ||
</div> | ||
</li> | ||
</ul> | ||
|
||
<h2><a href="/docs/getting-started-for-server#nextSteps" id="nextSteps">Next Steps</a></h2> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters