Skip to content

Commit 689a9ac

Browse files
committed
Initial commit
1 parent 318c992 commit 689a9ac

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Appwrite SDK for Python
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-python.svg?v=1)
4-
![Version](https://img.shields.io/badge/api%20version-latest-blue.svg?v=1)
4+
![Version](https://img.shields.io/badge/api%20version-0.2.0-blue.svg?v=1)
55

66
**WORK IN PROGRESS - NOT READY FOR USAGE - Want to help us improve this client SDK? Send a pull request to Appwrite [SDK generator repository](https://github.com/appwrite/sdk-generator).**
77

appwrite/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class Client:
55
def __init__(self):
66
self._self_signed = False
7-
self._endpoint = 'https://https://appwrite.io/v1'
7+
self._endpoint = 'https://appwrite.io/v1'
88
self._global_headers = {
99
'content-type': '',
1010
'x-sdk-version': 'appwrite:python:1.0.0',

appwrite/services/users.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,17 @@ def get_user_prefs(self, user_id):
5858
return self.client.call('get', path, {
5959
}, params)
6060

61+
def update_user_prefs(self, user_id, prefs):
62+
"""Update Account Prefs"""
63+
64+
params = {}
65+
path = '/users/{userId}/prefs'
66+
path.replace('{userId}', user_id)
67+
params['prefs'] = prefs
68+
69+
return self.client.call('patch', path, {
70+
}, params)
71+
6172
def get_user_sessions(self, user_id):
6273
"""Get User Sessions"""
6374

@@ -78,7 +89,7 @@ def delete_user_sessions(self, user_id):
7889
return self.client.call('delete', path, {
7990
}, params)
8091

81-
def delete_users_session(self, user_id, session_id):
92+
def delete_user_session(self, user_id, session_id):
8293
"""Delete User Session"""
8394

8495
params = {}

0 commit comments

Comments
 (0)