Get Started - Learn How To Make Your Bot!
List of all currently Free Items
Added on version 23.3.0
get_grabs(self, starts_after: str | None = None, ends_before: str | None = None, sort_order: SORT_OPTION = "desc", limit: int = 20, title: str | None = None,) -> GetPublicGrabsResponse:
Fetch a list of grabs, can be filtered, ordered, and paginated.
Parameters:
title
: The title of the grab to retrieve.sort_order
: Determines the order in which results are returned. Can be eitherĀ asc
Ā for ascending order orĀ desc
Ā for descending order.starts_after
: The ID of the grab from which to start the query. This is useful for paginating results.ends_before
: The ID of the grab to end the query before. This is also useful for paginating results.limit
: The maximum number of grabs to retrieve per request.Returns:
GetPublicGrabsResponse
: A list of public data of grabs.Hereās an example where we say a Grabās name and the bot will print the grab information in the console:
async def on_chat(self, user: User, message: str) -> None:
if message.lower().startswith("/getgrab "):
parts = message.split(" ")
if len(parts) < 2:
await self.highrise.chat("Invalid command")
return
grab_name = ""
for part in parts[1:]:
grab_name += part + " "
grab_name = grab_name[:-1]
grab = await self.webapi.get_grabs(title=grab_name)
print (grab)
Response:
GetPublicGrabsResponse(
grabs=[
Grab(
grab_id='64aed7344ec12803273c5bfb',
title='Rebel Winter',
description='',
background_color=(201, 195, 161),
banner_img_url='',
starts_at=DateTime(2023, 7, 18, 17, 0, 0, tzinfo=Timezone('+00:00')),
expires_at=DateTime(2023, 8, 17, 17, 0, 0, tzinfo=Timezone('+00:00')),
rewards=[
Reward(
category=<LegacyRewardCategory.OUTFIT: 'outfit'>,
amount=1,
reward_id='64b6d78db97b55a7119dc764',
item_id='eye-n_julyartistloungegrab2023theceliaeyes',
account_bound=False,
metadata=None
),
Reward(
category=<LegacyRewardCategory.OUTFIT: 'outfit'>,
amount=1,
reward_id='64b6d78db97b55a7119dc765',
item_id='mouth-n_julyartistloungegrab2023theceliamouth',
account_bound=False,
metadata=None
),
# ... (other rewards)
],
primary_img_url='<https://cdn.highrisegame.com/releases/2023/6/gachas//julyartistslounge2023_grab_primaryimage.webp>',
secondary_img_url='<https://cdn-production.joinhighrise.com/images/gacha/2023/7-RebelWinter/secondaryImageUrl_1896a3612e0.png>',
costs=[
Reward(
category=<LegacyRewardCategory.GEMS: 'gems'>,
amount=200,
reward_id='64b073feefb3d2770af14bbd',
item_id=None,
account_bound=False,
metadata=None
)
],
kompu_rewards=[
Reward(
category=<LegacyRewardCategory.OUTFIT: 'outfit'>,
amount=1,
reward_id='64b6d78db97b55a7119dc772',
item_id='hair_front-n_julyartistloungegrab2023thecelialongwavyhair',
account_bound=False,
metadata=None
)
],
is_tradable=True,
limited_time_kompu=None,
progress_reward=None
)
],
total=971,
first_id='64aed7344ec12803273c5bfb',
last_id='64aed7344ec12803273c5bfb'
)