Skip to main content

An api wrapper for Free Rider HD

Project description

Wiki documentation

Installation

pip install frpy

Example usage

from frpy import Client

client = Client()

# Create event listener
def ready(self):
	print("Ready!")

# Add event listener
client.on("ready", ready)

# Authentication
# token = Client.get_token(
# 	username='username',
# 	password='password'
# )

client.login("token")

Data Retrievers

Retrieving user info:

from frpy.rest import get_user

username = "Guest"
user = get_user(username)

print(user.json())

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"
}

Retrieving track data:

from frpy.rest import get_track

track_id = 1001
track = get_track(track_id)

print(track.json())

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


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.3.1.tar.gz (29.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

frpy-0.3.1-py3-none-any.whl (36.4 kB view details)

Uploaded Python 3

File details

Details for the file frpy-0.3.1.tar.gz.

File metadata

  • Download URL: frpy-0.3.1.tar.gz
  • Upload date:
  • Size: 29.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for frpy-0.3.1.tar.gz
Algorithm Hash digest
SHA256 14cd34af24753ad8017be0e8fb038cc8251ff2b26a95af4ca6e0a8934dd2c10f
MD5 8659b45a20d4074fd762ff7831ff9ec9
BLAKE2b-256 8ad385c40b229e5aa2d109f2fb49e4e7b19ecd518664fdd374607305198a1b00

See more details on using hashes here.

Provenance

The following attestation bundles were made for frpy-0.3.1.tar.gz:

Publisher: python-publish.yml on Calculamatrise/frpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file frpy-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: frpy-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 36.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for frpy-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b10b4ebede49edc04dac1ef53f386331fe261c8b09e5bfc028073bc40a0fbd56
MD5 5309ce544ce6222fa5e8b83c26f6951c
BLAKE2b-256 8c9716e65eefb0ab2411bf94190116cb2f4fb0995ecf4ce6b3da8f0c1ae55946

See more details on using hashes here.

Provenance

The following attestation bundles were made for frpy-0.3.1-py3-none-any.whl:

Publisher: python-publish.yml on Calculamatrise/frpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page