diff --git a/app/views/docs/authentication-server.phtml b/app/views/docs/authentication-server.phtml index 6e345d2a0..186b5eb5b 100644 --- a/app/views/docs/authentication-server.phtml +++ b/app/views/docs/authentication-server.phtml @@ -204,6 +204,19 @@ client .setJWT("eyJJ9.eyJ...886ca") // Your secret JSON Web Token +
using Appwrite;
+
+var client = new Client();
+
+client
+ .SetEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .SetProject("[PROJECT_ID]") // Your project ID
+ .SetJWT("eyJJ9.eyJ...886ca"); // Your secret JSON Web Token
+ using Appwrite;
+using Appwrite.Services;
+using Appwrite.Models;
+
+var client = new Client();
+
+client
+ .SetEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .SetProject("[PROJECT_ID]") // Your project ID
+ .SetJWT("eyJJ9.eyJ...886ca"); // Your secret JSON Web Token
+
+var databases = new Databases(client);
+
+var documentList = await databases.ListDocuments(
+ databaseId: "642f358bf4084c662590",
+ collectionId: "642f3592aa5fc856ad1e");
+
+// ... More code to manipulate the results
+ Only the birthday of Kevin is returned and documents where user-A
has no permissions to access are not returned.
using Appwrite;
+using Appwrite.Services;
+using Appwrite.Models;
+
+var client = new Client();
+
+client
+ .SetEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .SetProject("[PROJECT_ID]") // Your project ID
+ .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+var databases = new Databases(client);
+
+var documentList = await databases.ListDocuments(
+ databaseId: "642f358bf4084c662590",
+ collectionId: "642f3592aa5fc856ad1e");
+
+// ... More code to manipulate the results
using Appwrite;
+using Appwrite.Services;
+
+var client = new Client()
+ .SetEndpoint("https://cloud.appwrite.io/v1")
+ .SetProject("[PROJECT_ID]");
+
+var databases = new Databases(client);
+
+await databases.CreateRelationshipAttribute(
+ databaseId: "marvel",
+ collectionId: "movies",
+ relatedCollectionId: "reviews",
+ type: "oneToMany",
+ twoWay: true,
+ key: "reviews",
+ twoWayKey: "movie",
+ onDelete: "cascade");
+ The above example adds a relationship between the collections movies and reviews. A relationship attribute with the key reviews
is added to the movies collection and another relationship attribute with the key movie
is added to the reviews collection.
dotnet add package Appwrite
+ 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
+ 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
using Appwrite.Services;
+using Appwrite.Models;
+
+var users = new Users(client);
+
+var user = await users.Create(
+ userId: ID.Unique(),
+ email: "email@example.com",
+ phone: null,
+ password: "password");
+ 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@example.com",
+ phone: null,
+ password: "password");
+
+ The Appwrite .NET SDK expects an InputFile
class for file inputs.
+
Method | +Description | +
InputFile.FromPath(string path) |
+ Used to upload files from a provided path. | +
InputFile.FromStream(Stream stream, string filename, string mimeType) |
+ Used to upload files from a Stream object. Specify the file MIME type using the mimeType param. |
+
InputFile.FromBytes(byte[] bytes, string filename, string mimeType) |
+ Used to upload files from an array of bytes. Specify the file MIME type using the mimeType param. |
+