Skip to main content

Unofficial Python Client for Rocket Bot Royale Game API

Project description

Unofficial Client for RocketBotRoyale Game API

Downloads

⚠️️ For Educational Use Only!

This is an unofficial Python client for the Rocket Bot Royale game API. It allows users to interact with the game API, including authenticating, retrieving account details, collecting timed bonuses, sending friend requests, and purchasing crates.

Installation

Install the package using pip:

pip install -U rbrapi

Usage

Initialization

Initialize a RocketBotRoyale instance with an email and password:

from rbrapi import RocketBotRoyale
from rbrapi.errors import AuthenticationError

# Initialize with email and password
client = RocketBotRoyale(email="email@example.com", password="your_password")

Authentication

Authenticate with the RocketBotRoyale API using provided credentials:

Note: It auto-authenticates when RocketBotRoyale is initialized. Use this only for regenerating the session token.

try:
    client.authenticate()
    print("Authentication successful!")
except AuthenticationError as e:
    print(f"Authentication failed: {e}")

Account Details

Retrieve account details:

try:
    account_details = client.account()
    print(f"Account ID: {account_details.custom_id}")
    print(f"Username: {account_details.user["username"]}")
    print(f"Gems: {account_details.wallet["gems"]}")
    print(f"Coins: {account_details.wallet["coins"]}")
except AuthenticationError as e:
    print(f"Authentication failed: {e}")

Collect Timed Bonus

Collect a timed bonus:

from rbrapi.errors import CollectTimedBonusError

try:
    success = client.collect_timed_bonus()
    if success:
        print("Timed bonus collected successfully!")
    else:
        print("Failed to collect timed bonus.")
except AuthenticationError as e:
    print(f"Authentication failed: {e}")
except CollectTimedBonusError as e:
    print(f"Failed to collect timed bonus: {e}")

Send Friend Request

Send a friend request to another user:

from rbrapi.errors import FriendRequestError

friend_code = "c2829d50"

try:
    success = client.send_friend_request(friend_code)
    if success:
        print("Friend request sent successfully!")
    else:
        print("Failed to send friend request.")
except AuthenticationError as e:
    print(f"Authentication failed: {e}")
except FriendRequestError as e:
    print(f"Failed to send friend request: {e}")

Convert Friend Code to User ID

Convert a friend's code to their user ID:

from rbrapi.errors import AuthenticationError, userNotExistError

friend_code = "c2829d50"

try:
    user_id = client.friend_code_to_id(friend_code)
    print(f"User ID: {user_id}")
except AuthenticationError as e:
    print(f"Authentication failed: {e}")
except userNotExistError as e:
    print(f"User does not exist: {e}")

Purchase Crate

Purchase a crate (regular or elite):

from rbrapi.errors import LootBoxError

try:
    crate_details = client.buy_crate(elite=False)  # Set elite=True for elite crate
    print("Crate purchased successfully!")
    print(f"Crate details: {crate_details}")
except AuthenticationError as e:
    print(f"Authentication failed: {e}")
except LootBoxError as e:
    print(f"Failed to purchase crate: {e}")

Sign Up New User

Make a new account with the RocketBotRoyale API:

from rbrapi.errors import SignUpError

email = "new_user@example.com"
password = "new_password"
username = "new_username"

try:
    success = RocketBotRoyale.signup(email, password, username)
    if success:
        print(f"User {username} signed up successfully!")
    else:
        print("Failed to sign up user.")
except SignUpError as e:
    print(f"Failed to sign up user: {e}")

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

rbr_api_fork-0.7.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

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

rbr_api_fork-0.7.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file rbr_api_fork-0.7.1.tar.gz.

File metadata

  • Download URL: rbr_api_fork-0.7.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rbr_api_fork-0.7.1.tar.gz
Algorithm Hash digest
SHA256 0d973ee958b953f4fc6570d813e1fff288abf150b4fbfe6a059241ff0bff154c
MD5 18ed8110963a265ed000af25fed572aa
BLAKE2b-256 3c8535b6d8a5d4083a1b762a66496a0fc554169d179b665015cb04adc83a0b35

See more details on using hashes here.

File details

Details for the file rbr_api_fork-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: rbr_api_fork-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rbr_api_fork-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dcd136c7abc7d8ce92e32e29654eb6f69c51e7134f439654ce6f5ec22f63dcac
MD5 ba1443de8461fc8cb985c3f67c66bcad
BLAKE2b-256 3e319818dc172d95c0f9d20c3edad5a5163add59175dbccaf200cba6b3f73171

See more details on using hashes here.

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