diff --git a/Appwrite/Appwrite.csproj b/Appwrite/Appwrite.csproj index b0ba8a8..92ed7e5 100644 --- a/Appwrite/Appwrite.csproj +++ b/Appwrite/Appwrite.csproj @@ -2,7 +2,7 @@ netstandard2.0;net462 Appwrite - 0.17.0 + 0.18.0 Appwrite Team Appwrite Team diff --git a/Appwrite/Client.cs b/Appwrite/Client.cs index cfed64e..983108d 100644 --- a/Appwrite/Client.cs +++ b/Appwrite/Client.cs @@ -69,11 +69,11 @@ public Client( _headers = new Dictionary() { { "content-type", "application/json" }, - { "user-agent" , $"AppwriteDotNetSDK/0.17.0 ({Environment.OSVersion.Platform}; {Environment.OSVersion.VersionString})"}, + { "user-agent" , $"AppwriteDotNetSDK/0.18.0 ({Environment.OSVersion.Platform}; {Environment.OSVersion.VersionString})"}, { "x-sdk-name", ".NET" }, { "x-sdk-platform", "server" }, { "x-sdk-language", "dotnet" }, - { "x-sdk-version", "0.17.0"}, + { "x-sdk-version", "0.18.0"}, { "X-Appwrite-Response-Format", "1.8.0" } }; diff --git a/Appwrite/Models/Deployment.cs b/Appwrite/Models/Deployment.cs index 168c749..05e8981 100644 --- a/Appwrite/Models/Deployment.cs +++ b/Appwrite/Models/Deployment.cs @@ -69,9 +69,6 @@ public class Deployment [JsonPropertyName("providerRepositoryUrl")] public string ProviderRepositoryUrl { get; private set; } - [JsonPropertyName("providerBranch")] - public string ProviderBranch { get; private set; } - [JsonPropertyName("providerCommitHash")] public string ProviderCommitHash { get; private set; } @@ -87,6 +84,9 @@ public class Deployment [JsonPropertyName("providerCommitUrl")] public string ProviderCommitUrl { get; private set; } + [JsonPropertyName("providerBranch")] + public string ProviderBranch { get; private set; } + [JsonPropertyName("providerBranchUrl")] public string ProviderBranchUrl { get; private set; } @@ -111,12 +111,12 @@ public Deployment( string providerRepositoryName, string providerRepositoryOwner, string providerRepositoryUrl, - string providerBranch, string providerCommitHash, string providerCommitAuthorUrl, string providerCommitAuthor, string providerCommitMessage, string providerCommitUrl, + string providerBranch, string providerBranchUrl ) { Id = id; @@ -139,12 +139,12 @@ string providerBranchUrl ProviderRepositoryName = providerRepositoryName; ProviderRepositoryOwner = providerRepositoryOwner; ProviderRepositoryUrl = providerRepositoryUrl; - ProviderBranch = providerBranch; ProviderCommitHash = providerCommitHash; ProviderCommitAuthorUrl = providerCommitAuthorUrl; ProviderCommitAuthor = providerCommitAuthor; ProviderCommitMessage = providerCommitMessage; ProviderCommitUrl = providerCommitUrl; + ProviderBranch = providerBranch; ProviderBranchUrl = providerBranchUrl; } @@ -169,12 +169,12 @@ string providerBranchUrl providerRepositoryName: map["providerRepositoryName"].ToString(), providerRepositoryOwner: map["providerRepositoryOwner"].ToString(), providerRepositoryUrl: map["providerRepositoryUrl"].ToString(), - providerBranch: map["providerBranch"].ToString(), providerCommitHash: map["providerCommitHash"].ToString(), providerCommitAuthorUrl: map["providerCommitAuthorUrl"].ToString(), providerCommitAuthor: map["providerCommitAuthor"].ToString(), providerCommitMessage: map["providerCommitMessage"].ToString(), providerCommitUrl: map["providerCommitUrl"].ToString(), + providerBranch: map["providerBranch"].ToString(), providerBranchUrl: map["providerBranchUrl"].ToString() ); @@ -200,12 +200,12 @@ string providerBranchUrl { "providerRepositoryName", ProviderRepositoryName }, { "providerRepositoryOwner", ProviderRepositoryOwner }, { "providerRepositoryUrl", ProviderRepositoryUrl }, - { "providerBranch", ProviderBranch }, { "providerCommitHash", ProviderCommitHash }, { "providerCommitAuthorUrl", ProviderCommitAuthorUrl }, { "providerCommitAuthor", ProviderCommitAuthor }, { "providerCommitMessage", ProviderCommitMessage }, { "providerCommitUrl", ProviderCommitUrl }, + { "providerBranch", ProviderBranch }, { "providerBranchUrl", ProviderBranchUrl } }; } diff --git a/Appwrite/Query.cs b/Appwrite/Query.cs index f7c9c5a..5932cc8 100644 --- a/Appwrite/Query.cs +++ b/Appwrite/Query.cs @@ -138,6 +138,10 @@ public static string OrderDesc(string attribute) { return new Query("orderDesc", attribute, null).ToString(); } + public static string OrderRandom() { + return new Query("orderRandom", null, null).ToString(); + } + public static string Limit(int limit) { return new Query("limit", null, limit).ToString(); } diff --git a/README.md b/README.md index 4d2fdf9..14a441d 100644 --- a/README.md +++ b/README.md @@ -17,17 +17,17 @@ Appwrite is an open-source backend as a service server that abstract and simplif Add this reference to your project's `.csproj` file: ```xml - + ``` You can install packages from the command line: ```powershell # Package Manager -Install-Package Appwrite -Version 0.17.0 +Install-Package Appwrite -Version 0.18.0 # or .NET CLI -dotnet add package Appwrite --version 0.17.0 +dotnet add package Appwrite --version 0.18.0 ``` diff --git a/docs/examples/databases/create-line-attribute.md b/docs/examples/databases/create-line-attribute.md index 11b0654..d0de494 100644 --- a/docs/examples/databases/create-line-attribute.md +++ b/docs/examples/databases/create-line-attribute.md @@ -14,5 +14,5 @@ AttributeLine result = await databases.CreateLineAttribute( collectionId: "", key: "", required: false, - default: [[1,2], [3, 4]] // optional + default: [[1, 2], [3, 4], [5, 6]] // optional ); \ No newline at end of file diff --git a/docs/examples/databases/create-point-attribute.md b/docs/examples/databases/create-point-attribute.md index 6698e6d..4843174 100644 --- a/docs/examples/databases/create-point-attribute.md +++ b/docs/examples/databases/create-point-attribute.md @@ -14,5 +14,5 @@ AttributePoint result = await databases.CreatePointAttribute( collectionId: "", key: "", required: false, - default: [[1,2], [3, 4]] // optional + default: [1, 2] // optional ); \ No newline at end of file diff --git a/docs/examples/databases/create-polygon-attribute.md b/docs/examples/databases/create-polygon-attribute.md index b4de8bd..15c8b98 100644 --- a/docs/examples/databases/create-polygon-attribute.md +++ b/docs/examples/databases/create-polygon-attribute.md @@ -14,5 +14,5 @@ AttributePolygon result = await databases.CreatePolygonAttribute( collectionId: "", key: "", required: false, - default: [[1,2], [3, 4]] // optional + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] // optional ); \ No newline at end of file diff --git a/docs/examples/databases/update-line-attribute.md b/docs/examples/databases/update-line-attribute.md index 90bd643..0cc2157 100644 --- a/docs/examples/databases/update-line-attribute.md +++ b/docs/examples/databases/update-line-attribute.md @@ -14,6 +14,6 @@ AttributeLine result = await databases.UpdateLineAttribute( collectionId: "", key: "", required: false, - default: [[1,2], [3, 4]], // optional + default: [[1, 2], [3, 4], [5, 6]], // optional newKey: "" // optional ); \ No newline at end of file diff --git a/docs/examples/databases/update-point-attribute.md b/docs/examples/databases/update-point-attribute.md index eb504b3..3969b16 100644 --- a/docs/examples/databases/update-point-attribute.md +++ b/docs/examples/databases/update-point-attribute.md @@ -14,6 +14,6 @@ AttributePoint result = await databases.UpdatePointAttribute( collectionId: "", key: "", required: false, - default: [[1,2], [3, 4]], // optional + default: [1, 2], // optional newKey: "" // optional ); \ No newline at end of file diff --git a/docs/examples/databases/update-polygon-attribute.md b/docs/examples/databases/update-polygon-attribute.md index 90cbac9..1344574 100644 --- a/docs/examples/databases/update-polygon-attribute.md +++ b/docs/examples/databases/update-polygon-attribute.md @@ -14,6 +14,6 @@ AttributePolygon result = await databases.UpdatePolygonAttribute( collectionId: "", key: "", required: false, - default: [[1,2], [3, 4]], // optional + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // optional newKey: "" // optional ); \ No newline at end of file diff --git a/docs/examples/tablesdb/create-line-column.md b/docs/examples/tablesdb/create-line-column.md index ee9640b..31dc069 100644 --- a/docs/examples/tablesdb/create-line-column.md +++ b/docs/examples/tablesdb/create-line-column.md @@ -14,5 +14,5 @@ ColumnLine result = await tablesDB.CreateLineColumn( tableId: "", key: "", required: false, - default: [[1,2], [3, 4]] // optional + default: [[1, 2], [3, 4], [5, 6]] // optional ); \ No newline at end of file diff --git a/docs/examples/tablesdb/create-point-column.md b/docs/examples/tablesdb/create-point-column.md index ea1c524..a1461bc 100644 --- a/docs/examples/tablesdb/create-point-column.md +++ b/docs/examples/tablesdb/create-point-column.md @@ -14,5 +14,5 @@ ColumnPoint result = await tablesDB.CreatePointColumn( tableId: "", key: "", required: false, - default: [[1,2], [3, 4]] // optional + default: [1, 2] // optional ); \ No newline at end of file diff --git a/docs/examples/tablesdb/create-polygon-column.md b/docs/examples/tablesdb/create-polygon-column.md index a514dd4..e1e92b2 100644 --- a/docs/examples/tablesdb/create-polygon-column.md +++ b/docs/examples/tablesdb/create-polygon-column.md @@ -14,5 +14,5 @@ ColumnPolygon result = await tablesDB.CreatePolygonColumn( tableId: "", key: "", required: false, - default: [[1,2], [3, 4]] // optional + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] // optional ); \ No newline at end of file diff --git a/docs/examples/tablesdb/update-line-column.md b/docs/examples/tablesdb/update-line-column.md index b33213b..7a7620a 100644 --- a/docs/examples/tablesdb/update-line-column.md +++ b/docs/examples/tablesdb/update-line-column.md @@ -14,6 +14,6 @@ ColumnLine result = await tablesDB.UpdateLineColumn( tableId: "", key: "", required: false, - default: [[1,2], [3, 4]], // optional + default: [[1, 2], [3, 4], [5, 6]], // optional newKey: "" // optional ); \ No newline at end of file diff --git a/docs/examples/tablesdb/update-point-column.md b/docs/examples/tablesdb/update-point-column.md index db02716..663f183 100644 --- a/docs/examples/tablesdb/update-point-column.md +++ b/docs/examples/tablesdb/update-point-column.md @@ -14,6 +14,6 @@ ColumnPoint result = await tablesDB.UpdatePointColumn( tableId: "", key: "", required: false, - default: [[1,2], [3, 4]], // optional + default: [1, 2], // optional newKey: "" // optional ); \ No newline at end of file diff --git a/docs/examples/tablesdb/update-polygon-column.md b/docs/examples/tablesdb/update-polygon-column.md index 374033e..ac8300a 100644 --- a/docs/examples/tablesdb/update-polygon-column.md +++ b/docs/examples/tablesdb/update-polygon-column.md @@ -14,6 +14,6 @@ ColumnPolygon result = await tablesDB.UpdatePolygonColumn( tableId: "", key: "", required: false, - default: [[1,2], [3, 4]], // optional + default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // optional newKey: "" // optional ); \ No newline at end of file