Skip to content

Commit 77841bc

Browse files
committed
Add time between queries
1 parent b58a6d4 commit 77841bc

23 files changed

+898
-12
lines changed

appwrite/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ def __init__(self):
1414
self._endpoint = 'https://cloud.appwrite.io/v1'
1515
self._global_headers = {
1616
'content-type': '',
17-
'user-agent' : f'AppwritePythonSDK/12.0.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
17+
'user-agent' : f'AppwritePythonSDK/12.1.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
1818
'x-sdk-name': 'Python',
1919
'x-sdk-platform': 'server',
2020
'x-sdk-language': 'python',
21-
'x-sdk-version': '12.0.0',
21+
'x-sdk-version': '12.1.0',
2222
'X-Appwrite-Response-Format' : '1.8.0',
2323
}
2424

appwrite/enums/credit_card.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class CreditCard(Enum):
1313
MASTERCARD = "mastercard"
1414
NARANJA = "naranja"
1515
TARJETA_SHOPPING = "targeta-shopping"
16-
UNION_CHINA_PAY = "union-china-pay"
16+
UNION_PAY = "unionpay"
1717
VISA = "visa"
1818
MIR = "mir"
1919
MAESTRO = "maestro"

appwrite/enums/execution_method.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ class ExecutionMethod(Enum):
77
PATCH = "PATCH"
88
DELETE = "DELETE"
99
OPTIONS = "OPTIONS"
10+
HEAD = "HEAD"

appwrite/enums/index_type.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ class IndexType(Enum):
44
KEY = "key"
55
FULLTEXT = "fulltext"
66
UNIQUE = "unique"
7+
SPATIAL = "spatial"

appwrite/query.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ def created_before(value):
127127
def created_after(value):
128128
return str(Query("createdAfter", None, value))
129129

130+
@staticmethod
131+
def created_between(start, end):
132+
return str(Query("createdBetween", None, [start, end]))
133+
130134
@staticmethod
131135
def updated_before(value):
132136
return str(Query("updatedBefore", None, value))
@@ -135,6 +139,10 @@ def updated_before(value):
135139
def updated_after(value):
136140
return str(Query("updatedAfter", None, value))
137141

142+
@staticmethod
143+
def updated_between(start, end):
144+
return str(Query("updatedBetween", None, [start, end]))
145+
138146
@staticmethod
139147
def or_queries(queries):
140148
return str(Query("or", None, [json.loads(query) for query in queries]))

appwrite/services/account.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -869,8 +869,8 @@ def update_magic_url_session(self, user_id: str, secret: str) -> Dict[str, Any]:
869869
"""
870870
Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
871871
872-
.. deprecated::
873-
This API has been deprecated.
872+
.. deprecated::1.6.0
873+
This API has been deprecated since 1.6.0. Please use `account.create_session` instead.
874874
Parameters
875875
----------
876876
user_id : str
@@ -909,8 +909,8 @@ def update_phone_session(self, user_id: str, secret: str) -> Dict[str, Any]:
909909
"""
910910
Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
911911
912-
.. deprecated::
913-
This API has been deprecated.
912+
.. deprecated::1.6.0
913+
This API has been deprecated since 1.6.0. Please use `account.create_session` instead.
914914
Parameters
915915
----------
916916
user_id : str

appwrite/services/avatars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def get_credit_card(self, code: CreditCard, width: float = None, height: float =
6262
Parameters
6363
----------
6464
code : CreditCard
65-
Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.
65+
Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.
6666
width : float
6767
Image width. Pass an integer between 0 to 2000. Defaults to 100.
6868
height : float

0 commit comments

Comments
 (0)