An api wrapper for Free Rider HD
Project description
Demo Code
from frpy import Client
client = Client()
def ready(self):
print("Ready!")
client.on("ready", ready)
client.login("token")
# client.login(
# username = "Guest",
# password = "password"
# )
Data Retrievers
This api requests data from Free Rider HD
Example 1 - Getting User Info:
from frpy import getUser
username = "Guest"
user = getUser(username)
print(user.toJSON())
Expected Output:
{
"admin": false,
"avatar": "https://cdn.freeriderhd.com/free_rider_hd/sprites/guest_profile_v2.png",
"classic": false,
"cosmetics": {
"head": {
"img": "head_icons_4 head_icons_4-classic"
}
},
"createdTracks": [],
"displayName": "Guest",
"forums": null,
"friendLimitReached": false,
"friends": [],
"id": 0,
"likedTracks": [],
"mobileStats": {
"connected": "1",
"headCount": "--",
"level": "--",
"wins": "--"
},
"moderator": false,
"plus": false,
"recentlyCompleted": [],
"recentlyPlayed": [],
"stats": {
"comments": 0,
"completed": 0,
"created": 0,
"headCount": 1,
"rated": 0,
"totalHeadCount": 200,
"totalPoints": 0
},
"username": "guest"
}
Example 2 - Getting Track Data:
from frpy import getTrack
track_id = 1001
track = getTrack(track_id)
print(getTrack(track_id).toJSON())
Expected Output:
{
"author": "weewam",
"comments": [],
"createdAt": "11/19/13",
"createdDateAgo": "9 years ago",
"description": "Wild West is a Free Rider community classic track by weewam.",
"featured": false,
"hidden": 0,
"id": 1001,
"maxCommentLength": 500,
"size": 66,
"stats": {
"averageRating": 79,
"averageTime": "38:37.83",
"completionRate": 0.03,
"downVotes": 67,
"firstRuns": null,
"plays": "59.5k",
"runs": 571,
"upVotes": 257,
"votes": 324
},
"thumbnail": "https://cdn.freeriderhd.com/free_rider_hd/tracks/prd/b/8c/1001/768x250-v5.png",
"title": "Wild West",
"trackOfTheDay": {
"entries": [],
"gems": 500,
"lives": 30,
"refillCost": 10
},
"vehicle": "MTB",
"vehicles": [
"BMX",
"MTB"
]
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
frpy-0.2.0.tar.gz
(15.1 kB
view details)
Built Distribution
frpy-0.2.0-py3-none-any.whl
(15.1 kB
view details)
File details
Details for the file frpy-0.2.0.tar.gz
.
File metadata
- Download URL: frpy-0.2.0.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c67877bf94f6722eb8a62dac66b4636a7de2186d8c3d0113d50a3d4a1c657aef |
|
MD5 | b448e83e82b13267e64fcfe188b2159e |
|
BLAKE2b-256 | 6385b39a951e81dffe1989cf1aa7fa511189ab8ea5730053a69122cf3590281c |
File details
Details for the file frpy-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: frpy-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62e080813a3676917f8fe180d77f56c15ade9a48acab31db31d881554f51a604 |
|
MD5 | d4d996a9af1949a586373f6c790eed9a |
|
BLAKE2b-256 | 8fd3558b14a9fbdd1b236723dfec1f54703b88c709bada0abfa58f01ceb9aa14 |