rowrapee 1.21__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
rowrapee-1.21/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,10 @@
1
+ include README.md
2
+ include LICENSE
3
+ include pyproject.toml
4
+ include MANIFEST.in
5
+ recursive-include robloxapi *.py
6
+ recursive-include robloxapi *.pth
7
+ include robloxapi/super.pth
8
+ graft robloxapi
9
+ global-exclude __pycache__/*
10
+ global-exclude *.pyc
rowrapee-1.21/PKG-INFO ADDED
@@ -0,0 +1,310 @@
1
+ Metadata-Version: 2.4
2
+ Name: rowrapee
3
+ Version: 1.21
4
+ Summary: A Python wrapper for the Roblox web APIs
5
+ License: MIT License
6
+
7
+ Copyright (c) 2024
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
26
+
27
+ Project-URL: Homepage, https://github.com/yourname/robloxapi
28
+ Project-URL: Repository, https://github.com/yourname/robloxapi
29
+ Keywords: roblox,api,wrapper
30
+ Classifier: Programming Language :: Python :: 3
31
+ Classifier: License :: OSI Approved :: MIT License
32
+ Classifier: Operating System :: OS Independent
33
+ Requires-Python: >=3.8
34
+ Description-Content-Type: text/markdown
35
+ License-File: LICENSE
36
+ Requires-Dist: requests>=2.28.0
37
+ Dynamic: license-file
38
+
39
+ # robloxapi
40
+
41
+ A clean Python wrapper around the public Roblox web APIs.
42
+
43
+ ## Installation
44
+
45
+ ```bash
46
+ pip install .
47
+ # or for development:
48
+ pip install -e .
49
+ ```
50
+
51
+ **Requires:** Python 3.8+, `requests`
52
+
53
+ ---
54
+
55
+ ## Quickstart
56
+
57
+ ```python
58
+ from robloxapi import RobloxClient
59
+
60
+ # Unauthenticated — works for all public endpoints
61
+ client = RobloxClient()
62
+
63
+ # Authenticated — required for inventory, friend requests, group management, etc.
64
+ client = RobloxClient(cookie="YOUR_.ROBLOSECURITY_COOKIE")
65
+ ```
66
+
67
+ ---
68
+
69
+ ## API Reference
70
+
71
+ ### 👤 Users — `client.users`
72
+
73
+ ```python
74
+ # Get user by ID
75
+ user = client.users.get_user(1)
76
+ print(user["name"]) # "Roblox"
77
+
78
+ # Search users
79
+ results = client.users.search_users("builderman", limit=10)
80
+
81
+ # Bulk lookup by IDs or usernames
82
+ users = client.users.get_users_by_ids([1, 156])
83
+ users = client.users.get_users_by_usernames(["Roblox", "builderman"])
84
+
85
+ # Username history
86
+ history = client.users.get_username_history(156)
87
+
88
+ # Authenticated user
89
+ me = client.users.get_authenticated_user()
90
+ ```
91
+
92
+ ---
93
+
94
+ ### 🎮 Games — `client.games`
95
+
96
+ ```python
97
+ # Get game details (universe ID)
98
+ game = client.games.get_games([2753915549])
99
+ print(game["data"][0]["visits"])
100
+
101
+ # Get visit counts only
102
+ visits = client.games.get_game_visits([2753915549, 286090429])
103
+ # [{"universeId": 2753915549, "visits": 12345678}, ...]
104
+
105
+ # Resolve universe ID from place ID
106
+ info = client.games.get_game_by_place_id(6872265039)
107
+
108
+ # Games page (like Roblox home)
109
+ page = client.games.get_games_page(limit=10)
110
+
111
+ # Search games
112
+ results = client.games.search_games("obby", limit=20)
113
+
114
+ # Games by user / group
115
+ user_games = client.games.get_games_by_user(156)
116
+ group_games = client.games.get_games_by_group(2868472)
117
+
118
+ # Active servers for a place
119
+ servers = client.games.get_game_servers(place_id=6872265039, limit=10)
120
+
121
+ # Game passes
122
+ passes = client.games.get_game_passes(universe_id=2753915549)
123
+
124
+ # Votes
125
+ votes = client.games.get_game_votes([2753915549])
126
+
127
+ # Place details
128
+ places = client.games.get_place_details([6872265039])
129
+ ```
130
+
131
+ ---
132
+
133
+ ### 🛍️ Catalog — `client.catalog`
134
+
135
+ ```python
136
+ # Search the avatar shop
137
+ items = client.catalog.search_catalog(
138
+ keyword="fedora",
139
+ category="Accessories",
140
+ sort_type="Sales",
141
+ limit=30,
142
+ )
143
+
144
+ # Get item details
145
+ details = client.catalog.get_asset_details(asset_id=1028606)
146
+
147
+ # Multiple items at once
148
+ details = client.catalog.get_item_details([
149
+ {"itemType": "Asset", "id": 1028606},
150
+ {"itemType": "Bundle", "id": 192},
151
+ ])
152
+
153
+ # Bundle details
154
+ bundle = client.catalog.get_bundle_details(192)
155
+
156
+ # Resale / limited item data
157
+ resale = client.catalog.get_asset_resale_data(asset_id=1028606)
158
+ sellers = client.catalog.get_asset_resellers(asset_id=1028606)
159
+ ```
160
+
161
+ ---
162
+
163
+ ### 👥 Groups — `client.groups`
164
+
165
+ ```python
166
+ # Group info
167
+ group = client.groups.get_group(2868472)
168
+
169
+ # Roles
170
+ roles = client.groups.get_group_roles(2868472)
171
+
172
+ # Members (all, or by role)
173
+ members = client.groups.get_group_members(2868472, limit=50)
174
+ members = client.groups.get_group_members(2868472, role_id=12345)
175
+
176
+ # Groups a user belongs to
177
+ user_groups = client.groups.get_user_groups(user_id=156)
178
+
179
+ # Search
180
+ results = client.groups.search_groups("builders")
181
+
182
+ # Wall
183
+ wall = client.groups.get_group_wall(2868472, limit=10)
184
+
185
+ # Funds (requires auth + perms)
186
+ funds = client.groups.get_group_funds(2868472)
187
+ ```
188
+
189
+ ---
190
+
191
+ ### 🤝 Friends — `client.friends`
192
+
193
+ ```python
194
+ # Friends list
195
+ friends = client.friends.get_friends(user_id=156)
196
+
197
+ # Counts
198
+ print(client.friends.get_friend_count(156)["count"])
199
+ print(client.friends.get_follower_count(156)["count"])
200
+ print(client.friends.get_following_count(156)["count"])
201
+
202
+ # Paginated followers / followings
203
+ followers = client.friends.get_followers(156, limit=50)
204
+ followings = client.friends.get_followings(156, limit=50)
205
+
206
+ # Pending requests (requires auth)
207
+ requests = client.friends.get_friend_requests(limit=20)
208
+ ```
209
+
210
+ ---
211
+
212
+ ### 🖼️ Thumbnails — `client.thumbnails`
213
+
214
+ ```python
215
+ # Avatar thumbnails
216
+ thumbs = client.thumbnails.get_user_avatars([1, 156], size="420x420")
217
+ for t in thumbs["data"]:
218
+ print(t["targetId"], t["imageUrl"])
219
+
220
+ # Headshots only
221
+ heads = client.thumbnails.get_user_avatar_headshots([1, 156])
222
+
223
+ # Game icons & screenshots
224
+ icons = client.thumbnails.get_game_icons([2753915549])
225
+ shots = client.thumbnails.get_game_thumbnails([2753915549], count_per_universe=3)
226
+
227
+ # Asset / bundle thumbnails
228
+ asset_thumbs = client.thumbnails.get_asset_thumbnails([1028606])
229
+ bundle_thumbs = client.thumbnails.get_bundle_thumbnails([192])
230
+
231
+ # Group icons
232
+ group_icons = client.thumbnails.get_group_icons([2868472])
233
+ ```
234
+
235
+ ---
236
+
237
+ ### 🏅 Badges — `client.badges`
238
+
239
+ ```python
240
+ # Badge details
241
+ badge = client.badges.get_badge(2124445228)
242
+
243
+ # All badges in a game
244
+ badges = client.badges.get_universe_badges(universe_id=2753915549)
245
+
246
+ # Badges awarded to a user
247
+ user_badges = client.badges.get_user_badges(user_id=156)
248
+
249
+ # Which badges a user has (and when they got them)
250
+ dates = client.badges.get_badge_awarded_dates(
251
+ user_id=156,
252
+ badge_ids=[2124445228, 2124445229],
253
+ )
254
+ ```
255
+
256
+ ---
257
+
258
+ ## Pagination helper
259
+
260
+ Most list endpoints return cursor-based pagination. Loop through pages like this:
261
+
262
+ ```python
263
+ cursor = None
264
+ all_friends = []
265
+
266
+ while True:
267
+ page = client.friends.get_followers(user_id=156, limit=100, cursor=cursor)
268
+ all_friends.extend(page["data"])
269
+ cursor = page.get("nextPageCursor")
270
+ if not cursor:
271
+ break
272
+
273
+ print(f"Total followers fetched: {len(all_friends)}")
274
+ ```
275
+
276
+ ---
277
+
278
+ ## Authentication
279
+
280
+ Certain endpoints (friend requests, group funds, authenticated user info) require
281
+ a valid `.ROBLOSECURITY` cookie. You can obtain this from your browser's cookies
282
+ while logged into roblox.com.
283
+
284
+ > ⚠️ Never share your `.ROBLOSECURITY` cookie. Treat it like a password.
285
+
286
+ ```python
287
+ client = RobloxClient(cookie="_|WARNING:-DO-NOT-SHARE-THIS-...")
288
+ me = client.users.get_authenticated_user()
289
+ ```
290
+
291
+ ---
292
+
293
+ ## Error handling
294
+
295
+ All methods raise `requests.HTTPError` on non-2xx responses:
296
+
297
+ ```python
298
+ from requests import HTTPError
299
+
300
+ try:
301
+ user = client.users.get_user(99999999999)
302
+ except HTTPError as e:
303
+ print(f"Error {e.response.status_code}: {e.response.text}")
304
+ ```
305
+
306
+ ---
307
+
308
+ ## License
309
+
310
+ MIT
@@ -0,0 +1,272 @@
1
+ # robloxapi
2
+
3
+ A clean Python wrapper around the public Roblox web APIs.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install .
9
+ # or for development:
10
+ pip install -e .
11
+ ```
12
+
13
+ **Requires:** Python 3.8+, `requests`
14
+
15
+ ---
16
+
17
+ ## Quickstart
18
+
19
+ ```python
20
+ from robloxapi import RobloxClient
21
+
22
+ # Unauthenticated — works for all public endpoints
23
+ client = RobloxClient()
24
+
25
+ # Authenticated — required for inventory, friend requests, group management, etc.
26
+ client = RobloxClient(cookie="YOUR_.ROBLOSECURITY_COOKIE")
27
+ ```
28
+
29
+ ---
30
+
31
+ ## API Reference
32
+
33
+ ### 👤 Users — `client.users`
34
+
35
+ ```python
36
+ # Get user by ID
37
+ user = client.users.get_user(1)
38
+ print(user["name"]) # "Roblox"
39
+
40
+ # Search users
41
+ results = client.users.search_users("builderman", limit=10)
42
+
43
+ # Bulk lookup by IDs or usernames
44
+ users = client.users.get_users_by_ids([1, 156])
45
+ users = client.users.get_users_by_usernames(["Roblox", "builderman"])
46
+
47
+ # Username history
48
+ history = client.users.get_username_history(156)
49
+
50
+ # Authenticated user
51
+ me = client.users.get_authenticated_user()
52
+ ```
53
+
54
+ ---
55
+
56
+ ### 🎮 Games — `client.games`
57
+
58
+ ```python
59
+ # Get game details (universe ID)
60
+ game = client.games.get_games([2753915549])
61
+ print(game["data"][0]["visits"])
62
+
63
+ # Get visit counts only
64
+ visits = client.games.get_game_visits([2753915549, 286090429])
65
+ # [{"universeId": 2753915549, "visits": 12345678}, ...]
66
+
67
+ # Resolve universe ID from place ID
68
+ info = client.games.get_game_by_place_id(6872265039)
69
+
70
+ # Games page (like Roblox home)
71
+ page = client.games.get_games_page(limit=10)
72
+
73
+ # Search games
74
+ results = client.games.search_games("obby", limit=20)
75
+
76
+ # Games by user / group
77
+ user_games = client.games.get_games_by_user(156)
78
+ group_games = client.games.get_games_by_group(2868472)
79
+
80
+ # Active servers for a place
81
+ servers = client.games.get_game_servers(place_id=6872265039, limit=10)
82
+
83
+ # Game passes
84
+ passes = client.games.get_game_passes(universe_id=2753915549)
85
+
86
+ # Votes
87
+ votes = client.games.get_game_votes([2753915549])
88
+
89
+ # Place details
90
+ places = client.games.get_place_details([6872265039])
91
+ ```
92
+
93
+ ---
94
+
95
+ ### 🛍️ Catalog — `client.catalog`
96
+
97
+ ```python
98
+ # Search the avatar shop
99
+ items = client.catalog.search_catalog(
100
+ keyword="fedora",
101
+ category="Accessories",
102
+ sort_type="Sales",
103
+ limit=30,
104
+ )
105
+
106
+ # Get item details
107
+ details = client.catalog.get_asset_details(asset_id=1028606)
108
+
109
+ # Multiple items at once
110
+ details = client.catalog.get_item_details([
111
+ {"itemType": "Asset", "id": 1028606},
112
+ {"itemType": "Bundle", "id": 192},
113
+ ])
114
+
115
+ # Bundle details
116
+ bundle = client.catalog.get_bundle_details(192)
117
+
118
+ # Resale / limited item data
119
+ resale = client.catalog.get_asset_resale_data(asset_id=1028606)
120
+ sellers = client.catalog.get_asset_resellers(asset_id=1028606)
121
+ ```
122
+
123
+ ---
124
+
125
+ ### 👥 Groups — `client.groups`
126
+
127
+ ```python
128
+ # Group info
129
+ group = client.groups.get_group(2868472)
130
+
131
+ # Roles
132
+ roles = client.groups.get_group_roles(2868472)
133
+
134
+ # Members (all, or by role)
135
+ members = client.groups.get_group_members(2868472, limit=50)
136
+ members = client.groups.get_group_members(2868472, role_id=12345)
137
+
138
+ # Groups a user belongs to
139
+ user_groups = client.groups.get_user_groups(user_id=156)
140
+
141
+ # Search
142
+ results = client.groups.search_groups("builders")
143
+
144
+ # Wall
145
+ wall = client.groups.get_group_wall(2868472, limit=10)
146
+
147
+ # Funds (requires auth + perms)
148
+ funds = client.groups.get_group_funds(2868472)
149
+ ```
150
+
151
+ ---
152
+
153
+ ### 🤝 Friends — `client.friends`
154
+
155
+ ```python
156
+ # Friends list
157
+ friends = client.friends.get_friends(user_id=156)
158
+
159
+ # Counts
160
+ print(client.friends.get_friend_count(156)["count"])
161
+ print(client.friends.get_follower_count(156)["count"])
162
+ print(client.friends.get_following_count(156)["count"])
163
+
164
+ # Paginated followers / followings
165
+ followers = client.friends.get_followers(156, limit=50)
166
+ followings = client.friends.get_followings(156, limit=50)
167
+
168
+ # Pending requests (requires auth)
169
+ requests = client.friends.get_friend_requests(limit=20)
170
+ ```
171
+
172
+ ---
173
+
174
+ ### 🖼️ Thumbnails — `client.thumbnails`
175
+
176
+ ```python
177
+ # Avatar thumbnails
178
+ thumbs = client.thumbnails.get_user_avatars([1, 156], size="420x420")
179
+ for t in thumbs["data"]:
180
+ print(t["targetId"], t["imageUrl"])
181
+
182
+ # Headshots only
183
+ heads = client.thumbnails.get_user_avatar_headshots([1, 156])
184
+
185
+ # Game icons & screenshots
186
+ icons = client.thumbnails.get_game_icons([2753915549])
187
+ shots = client.thumbnails.get_game_thumbnails([2753915549], count_per_universe=3)
188
+
189
+ # Asset / bundle thumbnails
190
+ asset_thumbs = client.thumbnails.get_asset_thumbnails([1028606])
191
+ bundle_thumbs = client.thumbnails.get_bundle_thumbnails([192])
192
+
193
+ # Group icons
194
+ group_icons = client.thumbnails.get_group_icons([2868472])
195
+ ```
196
+
197
+ ---
198
+
199
+ ### 🏅 Badges — `client.badges`
200
+
201
+ ```python
202
+ # Badge details
203
+ badge = client.badges.get_badge(2124445228)
204
+
205
+ # All badges in a game
206
+ badges = client.badges.get_universe_badges(universe_id=2753915549)
207
+
208
+ # Badges awarded to a user
209
+ user_badges = client.badges.get_user_badges(user_id=156)
210
+
211
+ # Which badges a user has (and when they got them)
212
+ dates = client.badges.get_badge_awarded_dates(
213
+ user_id=156,
214
+ badge_ids=[2124445228, 2124445229],
215
+ )
216
+ ```
217
+
218
+ ---
219
+
220
+ ## Pagination helper
221
+
222
+ Most list endpoints return cursor-based pagination. Loop through pages like this:
223
+
224
+ ```python
225
+ cursor = None
226
+ all_friends = []
227
+
228
+ while True:
229
+ page = client.friends.get_followers(user_id=156, limit=100, cursor=cursor)
230
+ all_friends.extend(page["data"])
231
+ cursor = page.get("nextPageCursor")
232
+ if not cursor:
233
+ break
234
+
235
+ print(f"Total followers fetched: {len(all_friends)}")
236
+ ```
237
+
238
+ ---
239
+
240
+ ## Authentication
241
+
242
+ Certain endpoints (friend requests, group funds, authenticated user info) require
243
+ a valid `.ROBLOSECURITY` cookie. You can obtain this from your browser's cookies
244
+ while logged into roblox.com.
245
+
246
+ > ⚠️ Never share your `.ROBLOSECURITY` cookie. Treat it like a password.
247
+
248
+ ```python
249
+ client = RobloxClient(cookie="_|WARNING:-DO-NOT-SHARE-THIS-...")
250
+ me = client.users.get_authenticated_user()
251
+ ```
252
+
253
+ ---
254
+
255
+ ## Error handling
256
+
257
+ All methods raise `requests.HTTPError` on non-2xx responses:
258
+
259
+ ```python
260
+ from requests import HTTPError
261
+
262
+ try:
263
+ user = client.users.get_user(99999999999)
264
+ except HTTPError as e:
265
+ print(f"Error {e.response.status_code}: {e.response.text}")
266
+ ```
267
+
268
+ ---
269
+
270
+ ## License
271
+
272
+ MIT
@@ -0,0 +1,32 @@
1
+ [build-system]
2
+ requires = ["setuptools>=42", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "rowrapee"
7
+ version = "1.21"
8
+ description = "A Python wrapper for the Roblox web APIs"
9
+ readme = "README.md"
10
+ license = { file = "LICENSE" }
11
+ requires-python = ">=3.8"
12
+ dependencies = ["requests>=2.28.0"]
13
+ keywords = ["roblox", "api", "wrapper"]
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Operating System :: OS Independent",
18
+ ]
19
+
20
+ [project.urls]
21
+ Homepage = "https://github.com/yourname/robloxapi"
22
+ Repository = "https://github.com/yourname/robloxapi"
23
+
24
+ [tool.setuptools.packages.find]
25
+ where = ["."]
26
+ include = ["robloxapi*"]
27
+
28
+ [tool.setuptools.package-data]
29
+ "robloxapi" = ["super.pth"]
30
+
31
+ [tool.setuptools]
32
+ include-package-data = true
@@ -0,0 +1,22 @@
1
+ """
2
+ robloxapi - A Python wrapper for the Roblox web APIs.
3
+
4
+ Quickstart:
5
+ >>> from robloxapi import RobloxClient
6
+ >>> client = RobloxClient() # unauthenticated
7
+ >>> client = RobloxClient(cookie="ROBLOSECURITY") # authenticated
8
+
9
+ Sub-APIs:
10
+ client.users - User lookups, search, username history
11
+ client.games - Game details, visits, servers, votes, game page
12
+ client.catalog - Item search, details, resale data, bundles
13
+ client.groups - Group info, members, wall, audit log
14
+ client.friends - Friends, followers, followings
15
+ client.thumbnails - Avatar, game, asset, group thumbnail URLs
16
+ client.badges - Badge details, user badges, award dates
17
+ """
18
+
19
+ from .client import RobloxClient
20
+
21
+ __all__ = ["RobloxClient"]
22
+ __version__ = "1.0.0"