Skip to content

Commit 8dab491

Browse files
author
joel@joellee.org
committed
fix: include modules page
1 parent afc563a commit 8dab491

File tree

4 files changed

+65
-50
lines changed

4 files changed

+65
-50
lines changed

docs/source/examples/index.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Examples(WIP)
2+
=============
3+
4+
.. note::
5+
The library offers both synchronous and asynchronous clients.
6+
Note that the synchronous and asynchronous classes all provide the exact same interface.
7+
Only the async client and it's methods are documented here.
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
:caption: API Reference:
12+
13+
API </api/api>
14+
Client </api/client>

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Welcome to gotrue's documentation!
1313

1414
API Reference </api/index>
1515
Examples </examples/index>
16+
Miscellaneous Modules <modules>
1617

1718

1819

gotrue/_async/api.py

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ async def create_user(self, *, attributes: UserAttributes) -> User:
6060
6161
Raises
6262
------
63-
error : APIError
64-
If an error occurs
63+
APIError
64+
If an error occurs.
6565
"""
6666
headers = self.headers
6767
data = attributes.dict()
@@ -82,8 +82,8 @@ async def list_users(self) -> List[User]:
8282
8383
Raises
8484
------
85-
error : APIError
86-
If an error occurs
85+
APIError
86+
If an error occurs.
8787
"""
8888
headers = self.headers
8989
url = f"{self.url}/admin/users"
@@ -125,8 +125,8 @@ async def sign_up_with_email(
125125
126126
Raises
127127
------
128-
error : APIError
129-
If an error occurs
128+
APIError
129+
If an error occurs.
130130
"""
131131
headers = self.headers
132132
query_string = ""
@@ -164,8 +164,8 @@ async def sign_in_with_email(
164164
165165
Raises
166166
------
167-
error : APIError
168-
If an error occurs
167+
APIError
168+
If an error occurs.
169169
"""
170170
headers = self.headers
171171
query_string = "?grant_type=password"
@@ -203,8 +203,8 @@ async def sign_up_with_phone(
203203
204204
Raises
205205
------
206-
error : APIError
207-
If an error occurs
206+
APIError
207+
If an error occurs.
208208
"""
209209
headers = self.headers
210210
data = {"phone": phone, "password": password, "data": data}
@@ -235,8 +235,8 @@ async def sign_in_with_phone(
235235
236236
Raises
237237
------
238-
error : APIError
239-
If an error occurs
238+
APIError
239+
If an error occurs.
240240
"""
241241
data = {"phone": phone, "password": password}
242242
url = f"{self.url}/token?grant_type=password"
@@ -262,8 +262,8 @@ async def send_magic_link_email(
262262
263263
Raises
264264
------
265-
error : APIError
266-
If an error occurs
265+
APIError
266+
If an error occurs.
267267
"""
268268
headers = self.headers
269269
query_string = ""
@@ -285,8 +285,8 @@ async def send_mobile_otp(self, *, phone: str, create_user: bool) -> None:
285285
286286
Raises
287287
------
288-
error : APIError
289-
If an error occurs
288+
APIError
289+
If an error occurs.
290290
"""
291291
headers = self.headers
292292
data = {"phone": phone, "create_user": create_user}
@@ -320,8 +320,8 @@ async def verify_mobile_otp(
320320
321321
Raises
322322
------
323-
error : APIError
324-
If an error occurs
323+
APIError
324+
If an error occurs.
325325
"""
326326
headers = self.headers
327327
data = {
@@ -362,8 +362,8 @@ async def invite_user_by_email(
362362
363363
Raises
364364
------
365-
error : APIError
366-
If an error occurs
365+
APIError
366+
If an error occurs.
367367
"""
368368
headers = self.headers
369369
query_string = ""
@@ -392,8 +392,8 @@ async def reset_password_for_email(
392392
393393
Raises
394394
------
395-
error : APIError
396-
If an error occurs
395+
APIError
396+
If an error occurs.
397397
"""
398398
headers = self.headers
399399
query_string = ""
@@ -463,8 +463,8 @@ async def get_url_for_provider(
463463
464464
Raises
465465
------
466-
error : APIError
467-
If an error occurs
466+
APIError
467+
If an error occurs.
468468
"""
469469
url_params = [f"provider={encode_uri_component(provider)}"]
470470
if redirect_to:
@@ -489,8 +489,8 @@ async def get_user(self, *, jwt: str) -> User:
489489
490490
Raises
491491
------
492-
error : APIError
493-
If an error occurs
492+
APIError
493+
If an error occurs.
494494
"""
495495
headers = self._create_request_headers(jwt=jwt)
496496
url = f"{self.url}/user"
@@ -520,8 +520,8 @@ async def update_user(
520520
521521
Raises
522522
------
523-
error : APIError
524-
If an error occurs
523+
APIError
524+
If an error occurs.
525525
"""
526526
headers = self._create_request_headers(jwt=jwt)
527527
data = attributes.dict()
@@ -549,8 +549,8 @@ async def delete_user(self, *, uid: str, jwt: str) -> None:
549549
550550
Raises
551551
------
552-
error : APIError
553-
If an error occurs
552+
APIError
553+
If an error occurs.
554554
"""
555555
headers = self._create_request_headers(jwt=jwt)
556556
url = f"{self.url}/admin/users/{uid}"
@@ -572,8 +572,8 @@ async def refresh_access_token(self, *, refresh_token: str) -> Session:
572572
573573
Raises
574574
------
575-
error : APIError
576-
If an error occurs
575+
APIError
576+
If an error occurs.
577577
"""
578578
data = {"refresh_token": refresh_token}
579579
url = f"{self.url}/token?grant_type=refresh_token"
@@ -614,8 +614,8 @@ async def generate_link(
614614
615615
Raises
616616
------
617-
error : APIError
618-
If an error occurs
617+
APIError
618+
If an error occurs.
619619
"""
620620
headers = self.headers
621621
data = {

gotrue/_async/client.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ async def sign_up(
121121
122122
Raises
123123
------
124-
error : APIError
125-
If an error occurs
124+
APIError
125+
If an error occurs.
126126
"""
127127
await self._remove_session()
128128

@@ -202,8 +202,8 @@ async def sign_in(
202202
203203
Raises
204204
------
205-
error : APIError
206-
If an error occurs
205+
APIError
206+
If an error occurs.
207207
"""
208208
await self._remove_session()
209209
if email:
@@ -270,8 +270,8 @@ async def verify_otp(
270270
271271
Raises
272272
------
273-
error : APIError
274-
If an error occurs
273+
APIError
274+
If an error occurs.
275275
"""
276276
await self._remove_session()
277277
response = await self.api.verify_mobile_otp(
@@ -319,8 +319,8 @@ async def update(
319319
320320
Raises
321321
------
322-
error : APIError
323-
If an error occurs
322+
APIError
323+
If an error occurs.
324324
"""
325325
if not self.current_session:
326326
raise ValueError("Not logged in.")
@@ -354,8 +354,8 @@ async def set_session(self, *, refresh_token: str) -> Session:
354354
355355
Raises
356356
------
357-
error : APIError
358-
If an error occurs
357+
APIError
358+
If an error occurs.
359359
"""
360360
response = await self.api.refresh_access_token(refresh_token=refresh_token)
361361
await self._save_session(session=response)
@@ -378,8 +378,8 @@ async def set_auth(self, *, access_token: str) -> Session:
378378
379379
Raises
380380
------
381-
error : APIError
382-
If an error occurs
381+
APIError
382+
If an error occurs.
383383
"""
384384
session = Session(
385385
access_token=access_token,
@@ -420,8 +420,8 @@ async def get_session_from_url(
420420
421421
Raises
422422
------
423-
error : APIError
424-
If an error occurs
423+
APIError
424+
If an error occurs.
425425
"""
426426
data = urlparse(url)
427427
query = parse_qs(data.query)
@@ -496,8 +496,8 @@ def on_auth_state_change(
496496
497497
Raises
498498
------
499-
error : APIError
500-
If an error occurs
499+
APIError
500+
If an error occurs.
501501
"""
502502
unique_id = uuid4()
503503
subscription = Subscription(

0 commit comments

Comments
 (0)