Skip to content

Commit b3e313c

Browse files
authored
Merge pull request #81 from appwrite/dev
feat: .NET SDK update for version 0.23.0
2 parents 292d5ca + 5004a4b commit b3e313c

20 files changed

Lines changed: 48 additions & 24 deletions

Appwrite/Appwrite.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
44
<PackageId>Appwrite</PackageId>
5-
<Version>0.23.0</Version>
5+
<Version>0.24.0</Version>
66
<Authors>Appwrite Team</Authors>
77
<Company>Appwrite Team</Company>
88
<Description>

Appwrite/Client.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ public Client(
6969
_headers = new Dictionary<string, string>()
7070
{
7171
{ "content-type", "application/json" },
72-
{ "user-agent" , $"AppwriteDotNetSDK/0.23.0 ({Environment.OSVersion.Platform}; {Environment.OSVersion.VersionString})"},
72+
{ "user-agent" , $"AppwriteDotNetSDK/0.24.0 ({Environment.OSVersion.Platform}; {Environment.OSVersion.VersionString})"},
7373
{ "x-sdk-name", ".NET" },
7474
{ "x-sdk-platform", "server" },
7575
{ "x-sdk-language", "dotnet" },
76-
{ "x-sdk-version", "0.23.0"},
76+
{ "x-sdk-version", "0.24.0"},
7777
{ "X-Appwrite-Response-Format", "1.8.0" }
7878
};
7979

Appwrite/Services/Databases.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ static Models.CollectionList Convert(Dictionary<string, object> it) =>
406406
/// </para>
407407
/// </summary>
408408
[Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.createTable` instead.")]
409-
public Task<Models.Collection> CreateCollection(string databaseId, string collectionId, string name, List<string>? permissions = null, bool? documentSecurity = null, bool? enabled = null)
409+
public Task<Models.Collection> CreateCollection(string databaseId, string collectionId, string name, List<string>? permissions = null, bool? documentSecurity = null, bool? enabled = null, List<object>? attributes = null, List<object>? indexes = null)
410410
{
411411
var apiPath = "/databases/{databaseId}/collections"
412412
.Replace("{databaseId}", databaseId);
@@ -417,7 +417,9 @@ static Models.CollectionList Convert(Dictionary<string, object> it) =>
417417
{ "name", name },
418418
{ "permissions", permissions },
419419
{ "documentSecurity", documentSecurity },
420-
{ "enabled", enabled }
420+
{ "enabled", enabled },
421+
{ "attributes", attributes },
422+
{ "indexes", indexes }
421423
};
422424

423425
var apiHeaders = new Dictionary<string, string>()

Appwrite/Services/TablesDB.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ static Models.TableList Convert(Dictionary<string, object> it) =>
399399
/// API or directly from your database console.
400400
/// </para>
401401
/// </summary>
402-
public Task<Models.Table> CreateTable(string databaseId, string tableId, string name, List<string>? permissions = null, bool? rowSecurity = null, bool? enabled = null)
402+
public Task<Models.Table> CreateTable(string databaseId, string tableId, string name, List<string>? permissions = null, bool? rowSecurity = null, bool? enabled = null, List<object>? columns = null, List<object>? indexes = null)
403403
{
404404
var apiPath = "/tablesdb/{databaseId}/tables"
405405
.Replace("{databaseId}", databaseId);
@@ -410,7 +410,9 @@ static Models.TableList Convert(Dictionary<string, object> it) =>
410410
{ "name", name },
411411
{ "permissions", permissions },
412412
{ "rowSecurity", rowSecurity },
413-
{ "enabled", enabled }
413+
{ "enabled", enabled },
414+
{ "columns", columns },
415+
{ "indexes", indexes }
414416
};
415417

416418
var apiHeaders = new Dictionary<string, string>()

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## 0.24.0
4+
5+
* Added ability to create columns and indexes synchronously while creating a table
6+
37
## 0.23.0
48

59
* Rename `VCSDeploymentType` enum to `VCSReferenceType`

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ Appwrite is an open-source backend as a service server that abstract and simplif
1717
Add this reference to your project's `.csproj` file:
1818

1919
```xml
20-
<PackageReference Include="Appwrite" Version="0.23.0" />
20+
<PackageReference Include="Appwrite" Version="0.24.0" />
2121
```
2222

2323
You can install packages from the command line:
2424

2525
```powershell
2626
# Package Manager
27-
Install-Package Appwrite -Version 0.23.0
27+
Install-Package Appwrite -Version 0.24.0
2828
2929
# or .NET CLI
30-
dotnet add package Appwrite --version 0.23.0
30+
dotnet add package Appwrite --version 0.24.0
3131
```
3232

3333

docs/examples/account/create-anonymous-session.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ using Appwrite.Services;
44

55
Client client = new Client()
66
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
7-
.SetProject("<YOUR_PROJECT_ID>"); // Your project ID
7+
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
8+
.SetSession(""); // The user session to authenticate with
89

910
Account account = new Account(client);
1011

docs/examples/account/create-email-password-session.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ using Appwrite.Services;
44

55
Client client = new Client()
66
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
7-
.SetProject("<YOUR_PROJECT_ID>"); // Your project ID
7+
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
8+
.SetSession(""); // The user session to authenticate with
89

910
Account account = new Account(client);
1011

docs/examples/account/create-email-token.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ using Appwrite.Services;
44

55
Client client = new Client()
66
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
7-
.SetProject("<YOUR_PROJECT_ID>"); // Your project ID
7+
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
8+
.SetSession(""); // The user session to authenticate with
89

910
Account account = new Account(client);
1011

docs/examples/account/create-jwt.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ using Appwrite.Services;
44

55
Client client = new Client()
66
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
7-
.SetProject("<YOUR_PROJECT_ID>"); // Your project ID
7+
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
8+
.SetSession(""); // The user session to authenticate with
89

910
Account account = new Account(client);
1011

0 commit comments

Comments
 (0)