Skip to content

Commit b89d8fc

Browse files
committed
Specify if authorization required in descs
1 parent 6bf1c1a commit b89d8fc

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

src/recnetpy/managers/account_manager.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ async def get(self, name: str) -> Optional['Account']:
1717
Gets user data by their username, and returns it as an account object.
1818
Returns nothing if the account doesn't exist.
1919
20+
Authorization required.
21+
2022
:param name: The username of the RecNet user.
2123
:return: An account object representing the data or nothing if not found.
2224
"""
@@ -29,6 +31,8 @@ async def fetch(self, id: int) -> Optional['Account']:
2931
Gets user data by their id, and returns it as an account object.
3032
Returns nothing if an account with the specified id doesn't exist.
3133
34+
Authorization required.
35+
3236
:param id: The id of the RecNet user.
3337
:return: An account object representing the data or nothing if not found.
3438
"""
@@ -42,6 +46,8 @@ async def get_many(self, names: List[str]) -> List['Account']:
4246
a list of account object.
4347
Accounts that couldn't be found will be silently ignored.
4448
49+
Authorization required.
50+
4551
:param names: A list of username.
4652
:return: A list of account objects.
4753
"""
@@ -56,6 +62,8 @@ async def fetch_many(self, ids: List[int]) -> List['Account']:
5662
a list of account object.
5763
Accounts that couldn't be found will be silently ignored.
5864
65+
Authorization required.
66+
5967
:param ids: A list of ids.
6068
:return: A list of account objects.
6169
"""
@@ -69,6 +77,8 @@ async def search(self, query: str) -> List['Account']:
6977
a list of account objects.
7078
If no account is found, an empty list will be returned.
7179
80+
Authorization required.
81+
7282
:param query: A search query string.
7383
:return: A list of account objects.
7484
"""

src/recnetpy/managers/event_manager.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ async def fetch(self, id: int) -> Optional['Event']:
1717
Gets event data by their id, and returns it as an event object.
1818
Returns nothing if the event doesn't exist or is private.
1919
20+
Authorization required.
21+
2022
:param id: The id of the event.
2123
:return: An event object representing the data or nothing if not found.
2224
"""
@@ -31,6 +33,8 @@ async def fetch_many(self, ids: List[int]) -> List['Event']:
3133
a list of event object.
3234
Events that couldn't be found will be silently ignored.
3335
36+
Authorization required.
37+
3438
:param ids: A list of ids.
3539
:return: A list of event objects.
3640
"""
@@ -43,6 +47,8 @@ async def search(self, query: str, take: int = 16, skip: int = 0, sort: int = 0)
4347
a list of event objects.
4448
If no event is found, an empty list will be returned.
4549
50+
Authorization required.
51+
4652
:param query: A search query string.
4753
:param take: The number of results to return.
4854
:param skip: The number of results to skip.
@@ -63,6 +69,8 @@ async def from_account(self, id: int, take: int = 16, skip: int = 0) -> List['Ev
6369
Gets a list of events created by a player.
6470
If no event or the respective account is found, an empty list will be returned.
6571
72+
Authorization required.
73+
6674
:param id: An account id.
6775
:param take: The number of results to return.
6876
:param skip: The number of results to skip.
@@ -80,6 +88,8 @@ async def in_room(self, id: int, take: int = 16, skip: int = 0) -> List['Event']
8088
Gets a list of events happening in a room.
8189
If no event or the respective room is found, an empty list will be returned.
8290
91+
Authorization required.
92+
8393
:param query: A room id.
8494
:param take: The number of results to return.
8595
:param skip: The number of results to skip.
@@ -96,6 +106,8 @@ async def get_events(self, take: int = 16, skip: int = 0, sort: int = 0) -> List
96106
"""
97107
Gets a list of events currently happening.
98108
109+
Authorization required.
110+
99111
:param take: The number of results to return.
100112
:param skip: The number of results to skip.
101113
:param sort: An integer that describes how the results are to be sorted.

src/recnetpy/managers/image_manager.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ async def get(self, name: str) -> Optional['Image']:
1919
Only accepts image names of public RecNet posts.
2020
Returns nothing if the image doesn't exist or is private.
2121
22+
Authorization required.
23+
2224
:param name: The name of the image.
2325
:return: An image object representing the data or nothing if not found.
2426
"""
@@ -35,6 +37,8 @@ async def get_many(self, names: List[str]) -> List['Image']:
3537
Only accepts image names of public RecNet posts.
3638
Images that couldn't be found will be silently ignored.
3739
40+
Authorization required.
41+
3842
:param name: The name of the image.
3943
:return: A list of image objects.
4044
"""
@@ -47,6 +51,8 @@ async def fetch(self, id: int) -> Optional['Image']:
4751
Gets image data by their id, and returns it as an image object.
4852
Returns nothing if the image doesn't exist or is private.
4953
54+
Authorization required.
55+
5056
:param id: The id of the image.
5157
:return: An image object representing the data or nothing if not found.
5258
"""
@@ -61,6 +67,8 @@ async def fetch_many(self, ids: List[int]) -> List['Image']:
6167
a list of image object.
6268
Images that couldn't be found will be silently ignored.
6369
70+
Authorization required.
71+
6472
:param ids: A list of ids.
6573
:return: A list of image objects.
6674
"""
@@ -72,6 +80,8 @@ async def from_account(self, id: int, take: int = 16, skip: int = 0, sort: int =
7280
Gets a list of images taken by a player.
7381
If no image or the respective account is found, an empty list will be returned.
7482
83+
Authorization required.
84+
7585
:param id: A player id.
7686
:param take: The number of results to return.
7787
:param skip: The number of results to skip.
@@ -91,6 +101,8 @@ async def player_feed(self, id: int, take: int = 16, skip: int = 0) -> List['Ima
91101
Gets a list of images taken of a player.
92102
If no image or the respective account is found, an empty list will be returned.
93103
104+
Authorization required.
105+
94106
:param id: A player id.
95107
:param take: The number of results to return.
96108
:param skip: The number of results to skip.
@@ -108,6 +120,8 @@ async def during_event(self, id: int, take: int = 16, skip: int = 0) -> List['Im
108120
Gets a list of images taken during an event.
109121
If no image or the respective event is found, an empty list will be returned.
110122
123+
Authorization required.
124+
111125
:param id: A event id.
112126
:param take: The number of results to return.
113127
:param skip: The number of results to skip.
@@ -125,6 +139,8 @@ async def in_room(self, id: int, take: int = 16, skip: int = 0, sort: int = 0) -
125139
Gets a list of images taken in a room.
126140
If no image or the respective room is found, an empty list will be returned.
127141
142+
Authorization required.
143+
128144
:param id: A room id.
129145
:param take: The number of results to return.
130146
:param skip: The number of results to skip.
@@ -143,6 +159,8 @@ async def front_page(self, take: int = 16, skip: int = 0) -> List['Image']:
143159
"""
144160
Gets a list of the most popular images on RecNet.
145161
162+
Authorization required.
163+
146164
:param take: The number of results to return.
147165
:param skip: The number of results to skip.
148166
:return: A list of image objects.

src/recnetpy/managers/invention_manager.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ async def fetch(self, id: int) -> Optional['Invention']:
1717
Gets invention data by their id, and returns it as an invention object.
1818
Returns nothing if the invention doesn't exist or is private.
1919
20+
Authorization required.
21+
2022
:param id: The id of the invention.
2123
:return: An invention object representing the data or nothing if not found.
2224
"""
@@ -31,6 +33,8 @@ async def search(self, query: str, take: int = 16) -> List['Invention']:
3133
a list of invention objects.
3234
If no invention is found, an empty list will be returned.
3335
36+
Authorization required.
37+
3438
:param query: A search query string.
3539
:return: A list of invention objects.
3640
"""
@@ -45,6 +49,8 @@ async def featured(self, take: int = 16, skip: int = 0) -> List['Invention']:
4549
"""
4650
Gets a list of the featured inventions on RecNet.
4751
52+
Authorization required.
53+
4854
:param take: The number of results to return.
4955
:param skip: The number of results to skip.
5056
:return: A list of invention objects.
@@ -60,6 +66,8 @@ async def top_today(self) -> List['Invention']:
6066
"""
6167
Gets a list of the top inventions on RecNet for today.
6268
69+
Authorization required.
70+
6371
:return: A list of invention objects.
6472
"""
6573
data: 'Response[List[InventionResponse]]' = await self.rec_net.apim.inventions.v1.toptoday.make_request('get')

0 commit comments

Comments
 (0)