Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions appwrite/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ def __init__(self):
self._endpoint = 'https://cloud.appwrite.io/v1'
self._global_headers = {
'content-type': '',
'user-agent' : f'AppwritePythonSDK/12.0.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
'user-agent' : f'AppwritePythonSDK/12.1.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
'x-sdk-name': 'Python',
'x-sdk-platform': 'server',
'x-sdk-language': 'python',
'x-sdk-version': '12.0.0',
'x-sdk-version': '12.1.0',
'X-Appwrite-Response-Format' : '1.8.0',
}

Expand Down
2 changes: 1 addition & 1 deletion appwrite/enums/credit_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CreditCard(Enum):
MASTERCARD = "mastercard"
NARANJA = "naranja"
TARJETA_SHOPPING = "targeta-shopping"
UNION_CHINA_PAY = "union-china-pay"
UNION_PAY = "unionpay"
VISA = "visa"
MIR = "mir"
MAESTRO = "maestro"
Expand Down
1 change: 1 addition & 0 deletions appwrite/enums/execution_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ class ExecutionMethod(Enum):
PATCH = "PATCH"
DELETE = "DELETE"
OPTIONS = "OPTIONS"
HEAD = "HEAD"
1 change: 1 addition & 0 deletions appwrite/enums/index_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ class IndexType(Enum):
KEY = "key"
FULLTEXT = "fulltext"
UNIQUE = "unique"
SPATIAL = "spatial"
8 changes: 8 additions & 0 deletions appwrite/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ def created_before(value):
def created_after(value):
return str(Query("createdAfter", None, value))

@staticmethod
def created_between(start, end):
return str(Query("createdBetween", None, [start, end]))

@staticmethod
def updated_before(value):
return str(Query("updatedBefore", None, value))
Expand All @@ -135,6 +139,10 @@ def updated_before(value):
def updated_after(value):
return str(Query("updatedAfter", None, value))

@staticmethod
def updated_between(start, end):
return str(Query("updatedBetween", None, [start, end]))

@staticmethod
def or_queries(queries):
return str(Query("or", None, [json.loads(query) for query in queries]))
Expand Down
8 changes: 4 additions & 4 deletions appwrite/services/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -869,8 +869,8 @@ def update_magic_url_session(self, user_id: str, secret: str) -> Dict[str, Any]:
"""
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.

.. deprecated::
This API has been deprecated.
.. deprecated::1.6.0
This API has been deprecated since 1.6.0. Please use `account.create_session` instead.
Parameters
----------
user_id : str
Expand Down Expand Up @@ -909,8 +909,8 @@ def update_phone_session(self, user_id: str, secret: str) -> Dict[str, Any]:
"""
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.

.. deprecated::
This API has been deprecated.
.. deprecated::1.6.0
This API has been deprecated since 1.6.0. Please use `account.create_session` instead.
Parameters
----------
user_id : str
Expand Down
2 changes: 1 addition & 1 deletion appwrite/services/avatars.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def get_credit_card(self, code: CreditCard, width: float = None, height: float =
Parameters
----------
code : CreditCard
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.
Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.
width : float
Image width. Pass an integer between 0 to 2000. Defaults to 100.
height : float
Expand Down
Loading