Skip to content

Commit 6fbb14c

Browse files
authored
Merge pull request #71 from appwrite/dev
feat: .NET SDK update for version 0.18.0
2 parents 668e18a + 80fe04d commit 6fbb14c

17 files changed

+29
-25
lines changed

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.17.0</Version>
5+
<Version>0.18.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.17.0 ({Environment.OSVersion.Platform}; {Environment.OSVersion.VersionString})"},
72+
{ "user-agent" , $"AppwriteDotNetSDK/0.18.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.17.0"},
76+
{ "x-sdk-version", "0.18.0"},
7777
{ "X-Appwrite-Response-Format", "1.8.0" }
7878
};
7979

Appwrite/Models/Deployment.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ public class Deployment
6969
[JsonPropertyName("providerRepositoryUrl")]
7070
public string ProviderRepositoryUrl { get; private set; }
7171

72-
[JsonPropertyName("providerBranch")]
73-
public string ProviderBranch { get; private set; }
74-
7572
[JsonPropertyName("providerCommitHash")]
7673
public string ProviderCommitHash { get; private set; }
7774

@@ -87,6 +84,9 @@ public class Deployment
8784
[JsonPropertyName("providerCommitUrl")]
8885
public string ProviderCommitUrl { get; private set; }
8986

87+
[JsonPropertyName("providerBranch")]
88+
public string ProviderBranch { get; private set; }
89+
9090
[JsonPropertyName("providerBranchUrl")]
9191
public string ProviderBranchUrl { get; private set; }
9292

@@ -111,12 +111,12 @@ public Deployment(
111111
string providerRepositoryName,
112112
string providerRepositoryOwner,
113113
string providerRepositoryUrl,
114-
string providerBranch,
115114
string providerCommitHash,
116115
string providerCommitAuthorUrl,
117116
string providerCommitAuthor,
118117
string providerCommitMessage,
119118
string providerCommitUrl,
119+
string providerBranch,
120120
string providerBranchUrl
121121
) {
122122
Id = id;
@@ -139,12 +139,12 @@ string providerBranchUrl
139139
ProviderRepositoryName = providerRepositoryName;
140140
ProviderRepositoryOwner = providerRepositoryOwner;
141141
ProviderRepositoryUrl = providerRepositoryUrl;
142-
ProviderBranch = providerBranch;
143142
ProviderCommitHash = providerCommitHash;
144143
ProviderCommitAuthorUrl = providerCommitAuthorUrl;
145144
ProviderCommitAuthor = providerCommitAuthor;
146145
ProviderCommitMessage = providerCommitMessage;
147146
ProviderCommitUrl = providerCommitUrl;
147+
ProviderBranch = providerBranch;
148148
ProviderBranchUrl = providerBranchUrl;
149149
}
150150

@@ -169,12 +169,12 @@ string providerBranchUrl
169169
providerRepositoryName: map["providerRepositoryName"].ToString(),
170170
providerRepositoryOwner: map["providerRepositoryOwner"].ToString(),
171171
providerRepositoryUrl: map["providerRepositoryUrl"].ToString(),
172-
providerBranch: map["providerBranch"].ToString(),
173172
providerCommitHash: map["providerCommitHash"].ToString(),
174173
providerCommitAuthorUrl: map["providerCommitAuthorUrl"].ToString(),
175174
providerCommitAuthor: map["providerCommitAuthor"].ToString(),
176175
providerCommitMessage: map["providerCommitMessage"].ToString(),
177176
providerCommitUrl: map["providerCommitUrl"].ToString(),
177+
providerBranch: map["providerBranch"].ToString(),
178178
providerBranchUrl: map["providerBranchUrl"].ToString()
179179
);
180180

@@ -200,12 +200,12 @@ string providerBranchUrl
200200
{ "providerRepositoryName", ProviderRepositoryName },
201201
{ "providerRepositoryOwner", ProviderRepositoryOwner },
202202
{ "providerRepositoryUrl", ProviderRepositoryUrl },
203-
{ "providerBranch", ProviderBranch },
204203
{ "providerCommitHash", ProviderCommitHash },
205204
{ "providerCommitAuthorUrl", ProviderCommitAuthorUrl },
206205
{ "providerCommitAuthor", ProviderCommitAuthor },
207206
{ "providerCommitMessage", ProviderCommitMessage },
208207
{ "providerCommitUrl", ProviderCommitUrl },
208+
{ "providerBranch", ProviderBranch },
209209
{ "providerBranchUrl", ProviderBranchUrl }
210210
};
211211
}

Appwrite/Query.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ public static string OrderDesc(string attribute) {
138138
return new Query("orderDesc", attribute, null).ToString();
139139
}
140140

141+
public static string OrderRandom() {
142+
return new Query("orderRandom", null, null).ToString();
143+
}
144+
141145
public static string Limit(int limit) {
142146
return new Query("limit", null, limit).ToString();
143147
}

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.17.0" />
20+
<PackageReference Include="Appwrite" Version="0.18.0" />
2121
```
2222

2323
You can install packages from the command line:
2424

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

3333

docs/examples/databases/create-line-attribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ AttributeLine result = await databases.CreateLineAttribute(
1414
collectionId: "<COLLECTION_ID>",
1515
key: "",
1616
required: false,
17-
default: [[1,2], [3, 4]] // optional
17+
default: [[1, 2], [3, 4], [5, 6]] // optional
1818
);

docs/examples/databases/create-point-attribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ AttributePoint result = await databases.CreatePointAttribute(
1414
collectionId: "<COLLECTION_ID>",
1515
key: "",
1616
required: false,
17-
default: [[1,2], [3, 4]] // optional
17+
default: [1, 2] // optional
1818
);

docs/examples/databases/create-polygon-attribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ AttributePolygon result = await databases.CreatePolygonAttribute(
1414
collectionId: "<COLLECTION_ID>",
1515
key: "",
1616
required: false,
17-
default: [[1,2], [3, 4]] // optional
17+
default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] // optional
1818
);

docs/examples/databases/update-line-attribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ AttributeLine result = await databases.UpdateLineAttribute(
1414
collectionId: "<COLLECTION_ID>",
1515
key: "",
1616
required: false,
17-
default: [[1,2], [3, 4]], // optional
17+
default: [[1, 2], [3, 4], [5, 6]], // optional
1818
newKey: "" // optional
1919
);

docs/examples/databases/update-point-attribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ AttributePoint result = await databases.UpdatePointAttribute(
1414
collectionId: "<COLLECTION_ID>",
1515
key: "",
1616
required: false,
17-
default: [[1,2], [3, 4]], // optional
17+
default: [1, 2], // optional
1818
newKey: "" // optional
1919
);

0 commit comments

Comments
 (0)