Skip to content

Commit 668e18a

Browse files
authored
Merge pull request #70 from appwrite/dev
Add time between queries
2 parents e91c07a + 2ccad0a commit 668e18a

31 files changed

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

Appwrite/Enums/CreditCard.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public CreditCard(string value)
2323
public static CreditCard Mastercard => new CreditCard("mastercard");
2424
public static CreditCard Naranja => new CreditCard("naranja");
2525
public static CreditCard TarjetaShopping => new CreditCard("targeta-shopping");
26-
public static CreditCard UnionChinaPay => new CreditCard("union-china-pay");
26+
public static CreditCard UnionPay => new CreditCard("unionpay");
2727
public static CreditCard Visa => new CreditCard("visa");
2828
public static CreditCard MIR => new CreditCard("mir");
2929
public static CreditCard Maestro => new CreditCard("maestro");

Appwrite/Enums/ExecutionMethod.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ public ExecutionMethod(string value)
1717
public static ExecutionMethod PATCH => new ExecutionMethod("PATCH");
1818
public static ExecutionMethod DELETE => new ExecutionMethod("DELETE");
1919
public static ExecutionMethod OPTIONS => new ExecutionMethod("OPTIONS");
20+
public static ExecutionMethod HEAD => new ExecutionMethod("HEAD");
2021
}
2122
}

Appwrite/Enums/IndexType.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ public IndexType(string value)
1414
public static IndexType Key => new IndexType("key");
1515
public static IndexType Fulltext => new IndexType("fulltext");
1616
public static IndexType Unique => new IndexType("unique");
17+
public static IndexType Spatial => new IndexType("spatial");
1718
}
1819
}

Appwrite/Models/AttributeLine.cs

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
2+
using System;
3+
using System.Linq;
4+
using System.Collections.Generic;
5+
using System.Text.Json;
6+
using System.Text.Json.Serialization;
7+
8+
namespace Appwrite.Models
9+
{
10+
public class AttributeLine
11+
{
12+
[JsonPropertyName("key")]
13+
public string Key { get; private set; }
14+
15+
[JsonPropertyName("type")]
16+
public string Type { get; private set; }
17+
18+
[JsonPropertyName("status")]
19+
public string Status { get; private set; }
20+
21+
[JsonPropertyName("error")]
22+
public string Error { get; private set; }
23+
24+
[JsonPropertyName("required")]
25+
public bool Required { get; private set; }
26+
27+
[JsonPropertyName("array")]
28+
public bool? Array { get; private set; }
29+
30+
[JsonPropertyName("$createdAt")]
31+
public string CreatedAt { get; private set; }
32+
33+
[JsonPropertyName("$updatedAt")]
34+
public string UpdatedAt { get; private set; }
35+
36+
[JsonPropertyName("default")]
37+
public List<object>? Default { get; private set; }
38+
39+
public AttributeLine(
40+
string key,
41+
string type,
42+
string status,
43+
string error,
44+
bool required,
45+
bool? array,
46+
string createdAt,
47+
string updatedAt,
48+
List<object>? xdefault
49+
) {
50+
Key = key;
51+
Type = type;
52+
Status = status;
53+
Error = error;
54+
Required = required;
55+
Array = array;
56+
CreatedAt = createdAt;
57+
UpdatedAt = updatedAt;
58+
Default = xdefault;
59+
}
60+
61+
public static AttributeLine From(Dictionary<string, object> map) => new AttributeLine(
62+
key: map["key"].ToString(),
63+
type: map["type"].ToString(),
64+
status: map["status"].ToString(),
65+
error: map["error"].ToString(),
66+
required: (bool)map["required"],
67+
array: (bool?)map["array"],
68+
createdAt: map["$createdAt"].ToString(),
69+
updatedAt: map["$updatedAt"].ToString(),
70+
xdefault: map["default"] is JsonElement jsonArrayProp9 ? jsonArrayProp9.Deserialize<List<object>>()! : (List<object>)map["default"]
71+
);
72+
73+
public Dictionary<string, object?> ToMap() => new Dictionary<string, object?>()
74+
{
75+
{ "key", Key },
76+
{ "type", Type },
77+
{ "status", Status },
78+
{ "error", Error },
79+
{ "required", Required },
80+
{ "array", Array },
81+
{ "$createdAt", CreatedAt },
82+
{ "$updatedAt", UpdatedAt },
83+
{ "default", Default }
84+
};
85+
}
86+
}

Appwrite/Models/AttributePoint.cs

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
2+
using System;
3+
using System.Linq;
4+
using System.Collections.Generic;
5+
using System.Text.Json;
6+
using System.Text.Json.Serialization;
7+
8+
namespace Appwrite.Models
9+
{
10+
public class AttributePoint
11+
{
12+
[JsonPropertyName("key")]
13+
public string Key { get; private set; }
14+
15+
[JsonPropertyName("type")]
16+
public string Type { get; private set; }
17+
18+
[JsonPropertyName("status")]
19+
public string Status { get; private set; }
20+
21+
[JsonPropertyName("error")]
22+
public string Error { get; private set; }
23+
24+
[JsonPropertyName("required")]
25+
public bool Required { get; private set; }
26+
27+
[JsonPropertyName("array")]
28+
public bool? Array { get; private set; }
29+
30+
[JsonPropertyName("$createdAt")]
31+
public string CreatedAt { get; private set; }
32+
33+
[JsonPropertyName("$updatedAt")]
34+
public string UpdatedAt { get; private set; }
35+
36+
[JsonPropertyName("default")]
37+
public List<object>? Default { get; private set; }
38+
39+
public AttributePoint(
40+
string key,
41+
string type,
42+
string status,
43+
string error,
44+
bool required,
45+
bool? array,
46+
string createdAt,
47+
string updatedAt,
48+
List<object>? xdefault
49+
) {
50+
Key = key;
51+
Type = type;
52+
Status = status;
53+
Error = error;
54+
Required = required;
55+
Array = array;
56+
CreatedAt = createdAt;
57+
UpdatedAt = updatedAt;
58+
Default = xdefault;
59+
}
60+
61+
public static AttributePoint From(Dictionary<string, object> map) => new AttributePoint(
62+
key: map["key"].ToString(),
63+
type: map["type"].ToString(),
64+
status: map["status"].ToString(),
65+
error: map["error"].ToString(),
66+
required: (bool)map["required"],
67+
array: (bool?)map["array"],
68+
createdAt: map["$createdAt"].ToString(),
69+
updatedAt: map["$updatedAt"].ToString(),
70+
xdefault: map["default"] is JsonElement jsonArrayProp9 ? jsonArrayProp9.Deserialize<List<object>>()! : (List<object>)map["default"]
71+
);
72+
73+
public Dictionary<string, object?> ToMap() => new Dictionary<string, object?>()
74+
{
75+
{ "key", Key },
76+
{ "type", Type },
77+
{ "status", Status },
78+
{ "error", Error },
79+
{ "required", Required },
80+
{ "array", Array },
81+
{ "$createdAt", CreatedAt },
82+
{ "$updatedAt", UpdatedAt },
83+
{ "default", Default }
84+
};
85+
}
86+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
2+
using System;
3+
using System.Linq;
4+
using System.Collections.Generic;
5+
using System.Text.Json;
6+
using System.Text.Json.Serialization;
7+
8+
namespace Appwrite.Models
9+
{
10+
public class AttributePolygon
11+
{
12+
[JsonPropertyName("key")]
13+
public string Key { get; private set; }
14+
15+
[JsonPropertyName("type")]
16+
public string Type { get; private set; }
17+
18+
[JsonPropertyName("status")]
19+
public string Status { get; private set; }
20+
21+
[JsonPropertyName("error")]
22+
public string Error { get; private set; }
23+
24+
[JsonPropertyName("required")]
25+
public bool Required { get; private set; }
26+
27+
[JsonPropertyName("array")]
28+
public bool? Array { get; private set; }
29+
30+
[JsonPropertyName("$createdAt")]
31+
public string CreatedAt { get; private set; }
32+
33+
[JsonPropertyName("$updatedAt")]
34+
public string UpdatedAt { get; private set; }
35+
36+
[JsonPropertyName("default")]
37+
public List<object>? Default { get; private set; }
38+
39+
public AttributePolygon(
40+
string key,
41+
string type,
42+
string status,
43+
string error,
44+
bool required,
45+
bool? array,
46+
string createdAt,
47+
string updatedAt,
48+
List<object>? xdefault
49+
) {
50+
Key = key;
51+
Type = type;
52+
Status = status;
53+
Error = error;
54+
Required = required;
55+
Array = array;
56+
CreatedAt = createdAt;
57+
UpdatedAt = updatedAt;
58+
Default = xdefault;
59+
}
60+
61+
public static AttributePolygon From(Dictionary<string, object> map) => new AttributePolygon(
62+
key: map["key"].ToString(),
63+
type: map["type"].ToString(),
64+
status: map["status"].ToString(),
65+
error: map["error"].ToString(),
66+
required: (bool)map["required"],
67+
array: (bool?)map["array"],
68+
createdAt: map["$createdAt"].ToString(),
69+
updatedAt: map["$updatedAt"].ToString(),
70+
xdefault: map["default"] is JsonElement jsonArrayProp9 ? jsonArrayProp9.Deserialize<List<object>>()! : (List<object>)map["default"]
71+
);
72+
73+
public Dictionary<string, object?> ToMap() => new Dictionary<string, object?>()
74+
{
75+
{ "key", Key },
76+
{ "type", Type },
77+
{ "status", Status },
78+
{ "error", Error },
79+
{ "required", Required },
80+
{ "array", Array },
81+
{ "$createdAt", CreatedAt },
82+
{ "$updatedAt", UpdatedAt },
83+
{ "default", Default }
84+
};
85+
}
86+
}

Appwrite/Models/ColumnLine.cs

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
2+
using System;
3+
using System.Linq;
4+
using System.Collections.Generic;
5+
using System.Text.Json;
6+
using System.Text.Json.Serialization;
7+
8+
namespace Appwrite.Models
9+
{
10+
public class ColumnLine
11+
{
12+
[JsonPropertyName("key")]
13+
public string Key { get; private set; }
14+
15+
[JsonPropertyName("type")]
16+
public string Type { get; private set; }
17+
18+
[JsonPropertyName("status")]
19+
public string Status { get; private set; }
20+
21+
[JsonPropertyName("error")]
22+
public string Error { get; private set; }
23+
24+
[JsonPropertyName("required")]
25+
public bool Required { get; private set; }
26+
27+
[JsonPropertyName("array")]
28+
public bool? Array { get; private set; }
29+
30+
[JsonPropertyName("$createdAt")]
31+
public string CreatedAt { get; private set; }
32+
33+
[JsonPropertyName("$updatedAt")]
34+
public string UpdatedAt { get; private set; }
35+
36+
[JsonPropertyName("default")]
37+
public List<object>? Default { get; private set; }
38+
39+
public ColumnLine(
40+
string key,
41+
string type,
42+
string status,
43+
string error,
44+
bool required,
45+
bool? array,
46+
string createdAt,
47+
string updatedAt,
48+
List<object>? xdefault
49+
) {
50+
Key = key;
51+
Type = type;
52+
Status = status;
53+
Error = error;
54+
Required = required;
55+
Array = array;
56+
CreatedAt = createdAt;
57+
UpdatedAt = updatedAt;
58+
Default = xdefault;
59+
}
60+
61+
public static ColumnLine From(Dictionary<string, object> map) => new ColumnLine(
62+
key: map["key"].ToString(),
63+
type: map["type"].ToString(),
64+
status: map["status"].ToString(),
65+
error: map["error"].ToString(),
66+
required: (bool)map["required"],
67+
array: (bool?)map["array"],
68+
createdAt: map["$createdAt"].ToString(),
69+
updatedAt: map["$updatedAt"].ToString(),
70+
xdefault: map["default"] is JsonElement jsonArrayProp9 ? jsonArrayProp9.Deserialize<List<object>>()! : (List<object>)map["default"]
71+
);
72+
73+
public Dictionary<string, object?> ToMap() => new Dictionary<string, object?>()
74+
{
75+
{ "key", Key },
76+
{ "type", Type },
77+
{ "status", Status },
78+
{ "error", Error },
79+
{ "required", Required },
80+
{ "array", Array },
81+
{ "$createdAt", CreatedAt },
82+
{ "$updatedAt", UpdatedAt },
83+
{ "default", Default }
84+
};
85+
}
86+
}

0 commit comments

Comments
 (0)